Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Applet fails to run after JRE upgrade

 
kamal panwar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had JRE 1.6 which was updated to 1.8.0_31. After this update my applet has stopped working and I am getting below error

java.lang.ExceptionInInitializerError
at com.sun.deploy.net.protocol.https.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.<init>(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.<init>(Unknown Source)
at sun.plugin.net.protocol.jar.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: sun.security.ssl.X509TrustManagerImpl cannot be cast to com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager
at com.sun.deploy.security.X509ExtendedDeployTrustManager.<init>(Unknown Source)
at com.sun.deploy.net.protocol.https.Handler$Initializer$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.net.protocol.https.Handler$Initializer.<clinit>(Unknown Source)
... 29 more
Exception: java.lang.ExceptionInInitializerError
java.lang.NoClassDefFoundError: Could not initialize class com.sun.deploy.net.protocol.https.Handler$Initializer
at com.sun.deploy.net.protocol.https.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.<init>(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.<init>(Unknown Source)
at sun.plugin.net.protocol.jar.Handler.openConnection(Unknown Source)
at java.net.URL.openConnection(Unknown Source)
at sun.misc.URLClassPath$JarLoader.getJarFile(Unknown Source)
at sun.misc.URLClassPath$JarLoader.access$600(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at sun.misc.URLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath$JarLoader.ensureOpen(Unknown Source)
at sun.misc.URLClassPath$JarLoader.<init>(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at sun.misc.URLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getLoader(Unknown Source)
at sun.misc.URLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NoClassDefFoundError: Could not initialize class com.sun.deploy.net.protocol.https.Handler$Initializer


I am using Jboss server and the server.xml file has been updated to use the correct Keystore and certificate using SSL. Below is what I am Using:

<Connector protocol="HTTP/1.1" SSLEnabled="true"
port="8443" address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/XYZ.keystore"
keystorePass="XXX" sslProtocol = "TLS" />

I have added the https site which I am trying to access in the exception list of both the browser and JAVA control Panel. Cleared the cache of both and have also deleted the user certificate to ensure the latest certificate gets downloaded.

Kindly help to know the resolution steps.
 
kamal panwar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was able to remove the above issue by unchecking and checking back the "Enable java content on browser" check box in the java control panel.
Still I am facing issues when the application is used by external set of users.

I observe that there are 2 sets of exceptions
1. Connection timeout
2. Class not getting loaded

All these issues started only after downloading JRE version 1.8.0_31-b13

Java Plug-in 11.31.2.13
Using JRE version 1.8.0_31-b13 Java HotSpot(TM) Client VM
User home directory = C:\Users\XYZ
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@195fb2b
security: Expected Main URL: https://www.VVV/GFH/SecurityApplet.jar
basic: Plugin2ClassLoader.addURL parent called for https://VVV/GFH/SecurityApplet.jar
network: Cache entry found [url: https://VVV/GFH/SecurityApplet.jar, version: null] prevalidated=false/0
cache: Adding MemoryCache entry: https://VVV/GFH/SecurityApplet.jar
cache: Resource https://VVV/GFH/SecurityApplet.jar has expired.
cache: Resource https://VVV/GFH/SecurityApplet.jar has cache control: no-cache.
network: Connecting https://VVV/GFH/SecurityApplet.jar with proxy=DIRECT
network: Cache entry not found [url: file:/D:/Program%20Files/Java/lib/ext/sunec.jar, version: null]
network: Cache entry not found [url: file:/D:/Program%20Files/Java/lib/ext/sunjce_provider.jar, version: null]
network: Connecting http://VVV:443/ with proxy=DIRECT
network: Connecting https://VVV/GFH/SecurityApplet.jar with proxy=DIRECT
network: Connecting http:/VVV:443/ with proxy=DIRECT
java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)

Also getting class not found as below

basic: load: class com/cosl/security/GHB/api/MACApplet.class not found.
java.lang.ClassNotFoundException: com.cosl.security.GHB.api.MACApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ignored exception: java.lang.ClassNotFoundException: com.cosl.security.armor4c.api.MACApplet.class
basic: Dialog type is not candidate for embedding
security: Reset deny session certificate store


Any help on these is appreciated. Am stuck on this issue since 3 -4 weeks and there is no solution available anywhere
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic