Note that there are some explanatory texts on larger screens.

plurals
  1. POJava applet stopped working after update to JRE 7u21
    primarykey
    data
    text
    <p>My java applet stopped working once JRE was updated to 7u21.</p> <p>Short summary:</p> <ul> <li><p>The Exceptions I get are: netscape.javascript.JSException and<br> java.lang.NoClassDefFoundError. the applet worked fine until JRE 7u21. </p></li> <li><p>The applet is embedded in a web page using Oracle's DeployJava.js. </p></li> <li><p>The applet is signed, it uses LiveConnect to fire events, it access USB and serial ports through JNI, it uses code from multiple JAR files. </p></li> <li><p>The failure happens on all desktop browsers tested (Firefox, chrome, IE8/9 and Safari on Mac).</p></li> </ul> <p>Details:</p> <ul> <li><p>I have a java applet that allows my website to communicate with a USB device.</p></li> <li><p>The applet has been working well for the past year.</p></li> <li><p>Once JRE7 update 21 was released - the applet stopped working.</p></li> <li><p>The applet is hosted in a web page (ASP.NET) using Oracle's DeployJava.js library.</p></li> <li><p>It uses LiveConnect to raise events back to my javascript code.</p></li> </ul> <p>The first problem I had on JRE 7u21 was an exception on the first attempt to raise an event through LiveConnect:</p> <pre><code>netscape.javascript.JSException: JavaScript error while calling "_notify" at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source) at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source) at sun.plugin2.main.client.MessagePassingJSObject.call(Unknown Source) at &lt;myapplet&gt;.fireJavascriptEvent(Unknown Source) at &lt;myapplet&gt;$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.asec.easypark.applets.HomeloadingApplet.start(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) </code></pre> <p>in order to mitigate this problem I added the following line to 'manifest' section in the ant script for the applet:</p> <pre><code>attribute name="Trusted-Library" value="true" </code></pre> <p>I built the applet using JDK 7u21 and it seemed to help:</p> <p>after that I started getting another error - so I believe this one was solved, but it may have caused the next problem.</p> <p>the second problem is this: the applet is calling code from several JAR files. on the first call to code in another JAR file (not that of the applet) fails with the following exception:</p> <pre><code>**java.lang.NoClassDefFoundError**: com/codeminders/hidapi/HIDManager at &lt;PackageInSecondJar&gt;.communication.HIDTransmitter.open(Unknown Source) at &lt;PackageInSecondJar&gt;.communication.HIDTransmitterSearcher.find(Unknown Source) at &lt;PackageInSecondJar&gt;.communication.CompositeTransmitterSearcher.find(Unknown Source) at &lt;PackageInAppletJar&gt;.communication.AppletCommunicationBroker.setupDeviceProxy(Unknown Source) at &lt;PackageInAppletJar&gt;.communication.AppletCommunicationBroker.setup(Unknown Source) at &lt;PackageInAppletJar&gt;.&lt;TheApplet&gt;$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at &lt;PackageInAppletJar&gt;.&lt;TheApplet&gt;.start(Unknown Source) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.start(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) </code></pre> <p>I already tried the following measures - without success:</p> <ul> <li><p>add HTTP header 'Cache-Control' = 'no-cache'</p></li> <li><p>add HTTP header 'Cache-Control' = 'no-cache, no-store, must-revalidate'</p></li> <li><p>use latest DeployJava.js from <a href="http://java.com/js/deployJava.txt" rel="noreferrer">http://java.com/js/deployJava.txt</a> (after renaming to .js)</p></li> </ul> <p>The applet already has these features:</p> <ul> <li><p>mark security ‘all-permissions’ in jnlp </p></li> <li><p>the main JAR is signed with certificate from an external CA </p></li> <li><p>the applet code is running inside a <code>AccessController.doPrivileged</code> block.</p></li> </ul> <p>I'm a java newbie so please don't disregard the obvious solutions...</p> <p>Thanks in advance for your help,</p> <p>Guy.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload