Smart client Java 9

Can you start the Servoy 7 smart client and run correctly Servoy solutions in Java 9?

Has Servoy (R&D) tested this yet?

Please some feedback!?

We see a lot of errors in de java (9) log when starting Smart Client Servoy7.

What errors do you see?

Is / was it tested or not at Servoy?

I think that Java 9 has changed the way dependencies are handled. Instead of jar, we have modules and even the JDK itself seems to be modularized, so there’s no telling what standard libraries users are adding. I think that this is breaking your Servoy solution (even Servoy itself).

Thanks Juan-Carlos!

Is Java 9 support on the to do list of Servoy?

yes we have 2 cases where we will check if we need to change stuff for java 9:

https://support.servoy.com/browse/SVY-11235

https://support.servoy.com/browse/SVY-11234

that module system was in high debate

loads of them where against it in april: https://www.jcp.org/en/jsr/results?id=5959

but it did pass now:
https://www.jcp.org/en/jsr/results?id=6016

Thanks for this info Johan!

i investigated both startups (developer and smart client)
made wiki pages for both:

https://wiki.servoy.com/display/DOCS/Ja … martClient

https://wiki.servoy.com/display/DOCS/Ja … +developer

so for the developer this will mean that only from 8.3 (when we upgrade to Eclipse 4.7 Oxygen) it will work for Java 9.
Servoy 8.2 and lower will be forced to use Java 8

For the Smart Client we need some configuration options to get rid of that new module system setup (that that is default enabled is beyond me, how can they break such large part of code like that…)
But another big problem i encountered is this case: https://bugs.openjdk.java.net/browse/JDK-8178799
They don’t seem to fix this for java 9. That would be quite horrible for us if you use the “media:///xxxxx” in side your solution (like setting those urls on your label components or use it inside some html that you put on a label)
I don’t see a direct workaround so it will work for all situation where now that media:/// handler is used.

Can you please notify Oracle of the (Servoy Smart Client) urgency for fixing JDK-8178799 for Java 9? (Make some noise?)
Can you make a Servoy 7 Developer version (4.7.20, 4.8.1 ?) with Eclipse 4.7 Oxygen?

Can you keep on top of this?

Regards,

i already added a new bug pointing to that one that we really need that backported to java 9
But you can do the same adding a bug at oracle asking for a backport…

No we can’t update servoy 7 with that that is way to huge, that will only work with a new 8.3 release.

Hi Johan,

i already added a new bug pointing to that one that we really need that backported to java 9

What is the bug-number at Oracle if you filed it public?

Regards,

thats not visible

the only public bug i can find is: https://bugs.openjdk.java.net/browse/JDK-8178799

so if you want to point oracle to that case that it is quite a serious regression, please just create also an issue in their system pointing to that bug.

https://wiki.servoy.com/display/DOCS/Java+9+support+and+the+SmartClient

Should this Java 9 setting also work on Servoy 7 Application Server?
If not please fix, at short term we cannot upgrade to Servoy 8 for all of our customers on premise.

Regards,

As far as i know the Servoy version doesn’t matter for smart clients on the client machines
You just need to configure the same thing at the server so that the jnlp vmargs have the right values.

As long as you don’t really depend on media:/// in custom html that you can have on labels or html area’s

With the “–add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED” on Servoy 7 admin page “servoy.vmClientArgs”

servoy_properties file line:
servoy.vmClientArgs=–add-exports=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED

I still get the error

Java Web Start 12.0.0.0
Using JRE version 9+181 Java HotSpot™ Server VM
JRE expiration date: 03-02-18 00:00
User home directory = C:\Users\Lambert

c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to

sep. 14, 2017 1:07:04 P.M. com.servoy.j2db.util.Debug error
SEVERE: Throwable
java.lang.IllegalAccessException: class com.servoy.j2db.LAFManager cannot access class com.sun.java.swing.plaf.windows.WindowsLookAndFeel (in module java.desktop) because module java.desktop does not export com.sun.java.swing.plaf.windows to unnamed module @1acd459
at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Unknown Source)
at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Unknown Source)
at java.base/java.lang.Class.newInstance(Unknown Source)
at com.servoy.j2db.LAFManager.createInstance(LAFManager.java:113)
at com.servoy.j2db.smart.J2DBClient.putClientProperty(J2DBClient.java:1734)
at com.servoy.j2db.smart.J2DBClient.setLookAndFeel(J2DBClient.java:1565)
at com.servoy.j2db.smart.J2DBClient.startupApplication(J2DBClient.java:782)
at com.servoy.j2db.smart.J2DBClient$4.run(J2DBClient.java:693)
at com.servoy.j2db.smart.J2DBClient.mainImpl(J2DBClient.java:717)
at com.servoy.j2db.smart.J2DBClient.main(J2DBClient.java:680)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at jdk.javaws@9/com.sun.javaws.Launcher.executeApplication(Unknown Source)
at jdk.javaws@9/com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at jdk.javaws@9/com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at jdk.javaws@9/com.sun.javaws.Launcher.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Are you sure this should work for Servoy 7 smart client javawebstart?
Is there a way to find out the complete command line that Servoy creates for the javaws.exe startup?

i just tried the same with 7.4.10 and it is working fine
the first time i got that exception
then i added the vm args in and started again (i check the contents of the generated jnlp and it was in there)
and then i didn’t get it

So you really should just double check the jnlp file if it really have that stuff now.

Solved, after clearing the java cache I got a new jnlp containing the vm args.
Thanks Johan.

Now the next error:

Java Web Start 12.0.0.0
Using JRE version 9+181 Java HotSpot™ 64-Bit Server VM
JRE expiration date: 03-02-18 00:00
User home directory = C:\Users\Lambert

c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
0-5: set trace level to

sep. 14, 2017 3:52:43 P.M. com.servoy.j2db.util.Debug error
SEVERE: Throwable
java.lang.Error: factory already defined
at java.base/java.net.URL.setURLStreamHandlerFactory(Unknown Source)
at com.servoy.j2db.smart.J2DBClient.initStreamHandlerFactory(J2DBClient.java:828)
at com.servoy.j2db.smart.J2DBClient.applicationInit(J2DBClient.java:1114)
at com.servoy.j2db.smart.J2DBClient.startupApplication(J2DBClient.java:786)
at com.servoy.j2db.smart.J2DBClient$4.run(J2DBClient.java:693)
at com.servoy.j2db.smart.J2DBClient.mainImpl(J2DBClient.java:717)
at com.servoy.j2db.smart.J2DBClient.main(J2DBClient.java:680)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at jdk.javaws@9/com.sun.javaws.Launcher.executeApplication(Unknown Source)
at jdk.javaws@9/com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at jdk.javaws@9/com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at jdk.javaws@9/com.sun.javaws.Launcher.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Caught and handled this exception :
java.lang.NumberFormatException: For input string: “”
at java.base/java.lang.NumberFormatException.forInputString(Unknown Source)
at java.base/java.lang.Integer.parseInt(Unknown Source)
at java.base/java.lang.Integer.parseInt(Unknown Source)
at com.sun.media.imageioimpl.common.ImageUtil.processOnRegistration(ImageUtil.java:1408)
at com.sun.media.imageioimpl.plugins.wbmp.WBMPImageReaderSpi.onRegistration(WBMPImageReaderSpi.java:95)
at java.desktop/javax.imageio.spi.SubRegistry.registerServiceProvider(Unknown Source)
at java.desktop/javax.imageio.spi.ServiceRegistry.registerServiceProvider(Unknown Source)
at java.desktop/javax.imageio.spi.IIORegistry.registerApplicationClasspathSpis(Unknown Source)
at java.desktop/javax.imageio.spi.IIORegistry.(Unknown Source)
at java.desktop/javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at java.desktop/javax.imageio.ImageIO.(Unknown Source)
at com.servoy.j2db.util.ImageLoader.getSize(ImageLoader.java:562)
at com.servoy.j2db.util.gui.MyImageIcon.(MyImageIcon.java:66)
at com.servoy.j2db.smart.dataui.AbstractScriptLabel.setIconDirect(AbstractScriptLabel.java:636)
at com.servoy.j2db.smart.dataui.AbstractScriptLabel.setIcon(AbstractScriptLabel.java:622)
at com.servoy.j2db.smart.dataui.AbstractScriptLabel.setMediaIcon(AbstractScriptLabel.java:590)
at com.servoy.j2db.component.ComponentFactory.createGraphicalComponent(ComponentFactory.java:1822)
at com.servoy.j2db.component.ComponentFactory.createComponentEx(ComponentFactory.java:349)
at com.servoy.j2db.component.ComponentFactory.createComponent(ComponentFactory.java:257)
at com.servoy.j2db.smart.dataui.DataRendererFactory.placeElements(DataRendererFactory.java:300)
at com.servoy.j2db.smart.dataui.DataRendererFactory.completeRenderers(DataRendererFactory.java:266)
at com.servoy.j2db.FormController.createDataRenderers(FormController.java:449)
at com.servoy.j2db.FormController.init(FormController.java:279)
at com.servoy.j2db.FormManager.leaseFormPanel(FormManager.java:922)
at com.servoy.j2db.FormManager.getFormController(FormManager.java:826)
at com.servoy.j2db.smart.dataui.FormLookupPanel.createFormPanel(FormLookupPanel.java:124)
at com.servoy.j2db.smart.dataui.FormLookupPanel.getFormPanel(FormLookupPanel.java:198)
at com.servoy.j2db.smart.dataui.FormLookupPanel.getDefaultSort(FormLookupPanel.java:177)
at com.servoy.j2db.smart.dataui.SpecialTabPanel.getDefaultSort(SpecialTabPanel.java:378)
at com.servoy.j2db.smart.dataui.SpecialTabPanel.setRecord(SpecialTabPanel.java:243)
at com.servoy.j2db.dataprocessing.DataAdapterList.setRecord(DataAdapterList.java:386)
at com.servoy.j2db.smart.dataui.DataRenderer.getListCellRendererComponent(DataRenderer.java:447)
at com.servoy.j2db.smart.RecordView.syncSliderAndRefresh(RecordView.java:225)
at com.servoy.j2db.smart.RecordView.valueChanged(RecordView.java:334)
at com.servoy.j2db.smart.RecordView.setModelInternal(RecordView.java:103)
at com.servoy.j2db.smart.RecordView.setModel(RecordView.java:309)
at com.servoy.j2db.BasicFormController.notifyVisible(BasicFormController.java:316)
at com.servoy.j2db.FormController.notifyVisible(FormController.java:802)
at com.servoy.j2db.FormManager.showFormInMainPanel(FormManager.java:723)
at com.servoy.j2db.FormManager.showFormInMainPanel(FormManager.java:578)
at com.servoy.j2db.FormManager.makeSolutionSettings(FormManager.java:397)
at com.servoy.j2db.smart.SwingFormManager.makeSolutionSettings(SwingFormManager.java:179)
at com.servoy.j2db.FormManager$1.run(FormManager.java:169)
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

And worse: in our application the UI gets scrambled after some navigation…