Java 8U91 and COM plugin

Smart client Servoy 7, 6 and 5.

After java-update 8U91 we’re getting “java.lang.SecurityException: class “com.jacob.com.JacobObject” does not match trust level of other classes in the same package”
when using the COM-plugin.
Spent many hours up to now.

We added in the servoyguy_servoycom.jar.jnlp file : still error.
We resigned all jar files : still error.

Help !

Lambert,

When you check the jar file(s) do you see only your signatures (2 files) or maybe others as well?

I see only my own signature.
But I see on Java SE 8u92 Advanced and Java SE 8u92 Support Release Notes
for the bpr of 8u92 :

8145844
(Confidential) deploy plugin JARSigningException when loading jar file from JRE\lib\applet

I tested and found out:

  • no error when java cache disabled.
  • no error when solution run from java cache (Servoy shortcut on desktop).
  • no error when first time run after clearing java cache.

Maybe someone at Servoy can confirm this is a Java bug introduced in Java 8u91/92 ?
Workaround?

so it is only a problem when running from cache?

Then that seeems to me like a real java bug, there is nothing servoy can do about that

You could start using the bootstrapper (viewtopic.php?f=16&t=21190) then these problems should not happen at all.

(but i guess you use native stuff and you have to do a bit more for that)

I tested and found out:

  • no error when java cache disabled.
    - no error when solution run from java cache (Servoy shortcut on desktop).
  • no error when first time run after clearing java cache.

So Lambert,

In what scenario does it fail than?

I have now one customer that reports also an issue with java 8u91 on Mac, but in an other libarary:
I somehow can’t reproduce it myself…

java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:498)
         at com.servoy.j2db.scripting.PluginScope.get(PluginScope.java:116)
         at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:2141)
         at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1518)
         at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1505)
         at org.mozilla.javascript.gen.mod_DM_login_forms_login_start_4._c_start_0(mod_DM_login/forms/login/start:230)
         at org.mozilla.javascript.gen.mod_DM_login_forms_login_start_4.call(mod_DM_login/forms/login/start)
         at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:406)
         at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3204)
         at org.mozilla.javascript.gen.mod_DM_login_forms_login_start_4.call(mod_DM_login/forms/login/start)
         at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:628)
         at com.servoy.j2db.BasicFormController.executeFunction(BasicFormController.java:818)
         at com.servoy.j2db.BasicFormController.executeFormMethod(BasicFormController.java:702)
         at com.servoy.j2db.BasicFormController.executeOnLoadMethod(BasicFormController.java:600)
         at com.servoy.j2db.FormManager.getFormController(FormManager.java:830)
         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:310)
         at com.servoy.j2db.FormController.notifyVisible(FormController.java:802)
         at com.servoy.j2db.FormManager.showFormInMainPanel(FormManager.java:721)
         at com.servoy.j2db.FormManager.showFormInMainPanel(FormManager.java:577)
         at com.servoy.j2db.FormManager.makeSolutionSettings(FormManager.java:396)
         at com.servoy.j2db.smart.SwingFormManager.makeSolutionSettings(SwingFormManager.java:179)
         at com.servoy.j2db.FormManager$1.run(FormManager.java:168)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
         at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
         at java.awt.EventQueue.access$500(EventQueue.java:97)
         at java.awt.EventQueue$3.run(EventQueue.java:709)
         at java.awt.EventQueue$3.run(EventQueue.java:703)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.SecurityException: class "com.drmaison.plugin.support.ServoyLogAppender" does not match trust level of other classes in the same package
         at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
         at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
         at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
         at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
         at com.drmaison.plugin.drmaison.DrMaisonProvider.<init>(DrMaisonProvider.java:142)
         at com.drmaison.plugin.drmaison.DrMaison.getScriptObject(DrMaison.java:49)
         ... 50 more

I have the same problem on a iMac.
First I get a security warning (see picture). Both, the option ‘block’ and ‘dont block’ give the same result.

Mai 04, 2016 7:30:18 AM com.servoy.j2db.util.Debug error
SCHWERWIEGEND: Throwable, script stacktrace:
	at omsv_base_scopes/scopes/globals/Base_onSolutionOpen:90 (Base_onSolutionOpen)

Servoy-Plugin XML-Plugin kann nicht registriert werden
Mai 04, 2016 7:30:18 AM com.servoy.j2db.util.Debug error
SCHWERWIEGEND: Throwable
java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.servoy.j2db.scripting.PluginScope.get(PluginScope.java:116)
	at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:2141)
	at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1518)
	at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1505)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_om_div_Base_GlobalWertValue_468._c_Base_GlobalWertValue_0(Unknown Source)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_om_div_Base_GlobalWertValue_468.call(Unknown Source)
	at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:78)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_om_div_Base_GlobalWertKey_467._c_Base_GlobalWertKey_0(Unknown Source)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_om_div_Base_GlobalWertKey_467.call(Unknown Source)
	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:70)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_om_initial_Base_FarbenSetzen_466._c_Base_FarbenSetzen_0(Unknown Source)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_om_initial_Base_FarbenSetzen_466.call(Unknown Source)
	at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:97)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_om_initial_Base_InitBase_463._c_Base_InitBase_0(Unknown Source)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_om_initial_Base_InitBase_463.call(Unknown Source)
	at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:107)
	at org.mozilla.javascript.gen.omsv_office_scopes_globals_onOpen_270._c_onOpen_0(Unknown Source)
	at org.mozilla.javascript.gen.omsv_office_scopes_globals_onOpen_270.call(Unknown Source)
	at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2480)
	at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:335)
	at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:121)
	at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:70)
	at org.mozilla.javascript.gen.svy_nav_navigation_scopes_svyNavigation_initNavigation_40._c_initNavigation_0(Unknown Source)
	at org.mozilla.javascript.gen.svy_nav_navigation_scopes_svyNavigation_initNavigation_40.call(Unknown Source)
	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:62)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_globals_Base_onSolutionOpen_15._c_Base_onSolutionOpen_0(omsv_base_scopes/scopes/globals/Base_onSolutionOpen:90)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_globals_Base_onSolutionOpen_15.call(omsv_base_scopes/scopes/globals/Base_onSolutionOpen)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:406)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3204)
	at org.mozilla.javascript.gen.omsv_base_scopes_scopes_globals_Base_onSolutionOpen_15.call(omsv_base_scopes/scopes/globals/Base_onSolutionOpen)
	at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:628)
	at com.servoy.j2db.scripting.ScopesScope.executeGlobalFunction(ScopesScope.java:164)
	at com.servoy.j2db.FormManager.makeSolutionSettings(FormManager.java:360)
	at com.servoy.j2db.smart.SwingFormManager.makeSolutionSettings(SwingFormManager.java:179)
	at com.servoy.j2db.FormManager$1.run(FormManager.java:168)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.SecurityException: class "com.drmaison.plugin.support.ServoyLogAppender" does not match trust level of other classes in the same package
	at com.sun.deploy.security.CPCallbackHandler$ChildElement.checkResource(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath$JarLoader.checkResource(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
	at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at com.drmaison.plugin.xml.XMLProvider.<init>(XMLProvider.java:63)
	at com.drmaison.plugin.xml.XML.getScriptObject(XML.java:55)
	... 53 more

Hi Harjo,

It fails when started through shortcut “C:\ProgramData\Oracle\Java\javapath\javaws.exe http://10.100.100.111:8080/servoy-client/main.jnlp”
and Java is using the cache (2nd (or 3rd) startup after clearing java cache).

I think (and hope?) it’s Java bug 8145844 (Confidential)

http://www.oracle.com/technetwork/java/javaseproducts/documentation/8u92-revision-builds-relnotes-2994940.html

Regards,

I can confirm, that in our case it ONLY goes wrong when you launch the smartclient through the console with: javaws javaws https://xx.xxxxxxxx.xx/servoy-client/mySolution.jnlp

luckily, (almost) nobody uses this…

Hi Harjo,

luckily, (almost) nobody uses this…

What do you use for lauching smart client?

we just let the user download the jnlp from our website and than let the user start that. After that, java webstart creates a desktop icon, and users gonna use that.
so not by using the console!

Strange, this is what is in the Servoy created desktop icon:
“C:\Program Files (x86)\Java\jre1.8.0_91\bin\javaws.exe” -localfile -J-Djnlp.application.href=http://10.100.100.111:8080/servoy-client/main.jnlp “C:\Users\lambert.ISPSOFTWARE\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\48\1ad52530-7d485725”
This launches through the console as well…

in our case this in the shortcut:

"C:\Program Files\Java\jre1.8.0_73\bin\javaws.exe" -localfile "C:\Users\Harjo Kompagnie\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\13\5557600d-17db6e05"

I don’t see a jnlp or url entry

but I see in your case two different Java path’s ?

are you really using java 8u91 when starting via console?

1 “C:\ProgramData\Oracle\Java*javapath*\javaws.exe http://10.100.100.111:8080/servoy-client/main.jnlp”

Directory javapath is a so called symlink to the current Java installation. In my case 8u91.

2 “C:\Program Files (x86)\Java\jre1.8.0_91\bin\javaws.exe” -localfile -J-Djnlp.application.href=http://10.100.100.111:8080/servoy-client/main.jnlp “C:\Users\lambert.ISPSOFTWARE\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\48\1ad52530-7d485725”

Both shortcuts point to the same javaws.exe

  1. gives the error, 2) gives no error.
    Imho: the java cache plays some kind of role in this problem…

Hi Lambert,

I think I have found something

can you try to remove from the manifest file inside the jar: servoygoy_servoycom.jar

the entries:

Name: .project
SHA1-Digest: 0SjaO8qMCEP9qRlGSEgRPxG7EvE=

and

Name: .classpath
SHA1-Digest: S7paNJWZfni+P5g1WWAXigp9uEc=

so every Name property, that does not have any resource

than sign the jar again, and try again?
This will propably not fix the whole problem, because there are a lot more (3th party) plugins that have this problem. (not valid Name entries in the manifest)

i think those do have a resource
that sounds like the jar is packed with eclipse project files (.classpath and .project)

I don’t see them in the jar

On a mac Harjo?

what do you mean Marcel? this problem is not only Mac related…