Java 8U91 and COM plugin

Questions, answers, tips and ideas on Servoy Client

Java 8U91 and COM plugin

Postby lwjwillemsen » Mon Apr 25, 2016 1:55 pm

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 <security> <all-permissions/> </security> in the servoyguy_servoycom.jar.jnlp file : still error.
We resigned all jar files : still error.

Help !
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Java 8U91 and COM plugin

Postby IT2Be » Mon Apr 25, 2016 9:30 pm

Lambert,

When you check the jar file(s) do you see only your signatures (2 files) or maybe others as well?
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Java 8U91 and COM plugin

Postby lwjwillemsen » Mon Apr 25, 2016 10:54 pm

I see only my own signature.
But I see on http://www.oracle.com/technetwork/java/javaseproducts/documentation/8u92-revision-builds-relnotes-2994940.html
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.
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Java 8U91 and COM plugin

Postby lwjwillemsen » Thu Apr 28, 2016 9:00 am

Maybe someone at Servoy can confirm this is a Java bug introduced in Java 8u91/92 ?
Workaround?
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Java 8U91 and COM plugin

Postby jcompagner » Mon May 02, 2016 10:18 am

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)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Java 8U91 and COM plugin

Postby lwjwillemsen » Mon May 02, 2016 11:00 am

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.
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Java 8U91 and COM plugin

Postby Harjo » Tue May 03, 2016 10:23 pm

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....

Code: Select all
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
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Java 8U91 and COM plugin

Postby GabrielWyss » Wed May 04, 2016 7:33 am

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.

Code: Select all
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
Attachments
Java.png
Java.png (33.89 KiB) Viewed 11976 times
Gabriel Wyss
om computer - SAN Partner
http://www.omcomputer.ch
GabrielWyss
 
Posts: 83
Joined: Tue Jul 13, 2010 2:12 pm
Location: Cham, Switzerland

Re: Java 8U91 and COM plugin

Postby lwjwillemsen » Wed May 04, 2016 8:24 am

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,
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Java 8U91 and COM plugin

Postby Harjo » Wed May 04, 2016 9:38 am

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.....
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Java 8U91 and COM plugin

Postby lwjwillemsen » Wed May 04, 2016 10:49 am

Hi Harjo,

luckily, (almost) nobody uses this.....


What do you use for lauching smart client?
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Java 8U91 and COM plugin

Postby Harjo » Wed May 04, 2016 11:06 am

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!
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Java 8U91 and COM plugin

Postby lwjwillemsen » Wed May 04, 2016 11:18 am

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...
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Java 8U91 and COM plugin

Postby Harjo » Wed May 04, 2016 11:53 am

in our case this in the shortcut:
Code: Select all
"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?
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Java 8U91 and COM plugin

Postby lwjwillemsen » Wed May 04, 2016 2:13 pm

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...
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Next

Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 3 guests