Java WebStart launch fails when a JNLP is fixed to JRE 1.6 and JRE 1.7 is installed
Asked Answered
E

3

7

At my company, we download and launch a JNLP application that is tied to a JRE 1.6.0_20. We use the system cache feature to download the JARs.

When we install a JRE 1.7 on the PC, WebStart fails to launch. When we enable the logs, we see the following exception:

java.lang.ExceptionInInitializerError
    at com.sun.deploy.net.protocol.https.Handler.openConnection(Unknown Source)
    at java.net.URL.openConnection(Unknown Source)
    at com.sun.deploy.net.BasicHttpRequest.createUrlConnection(Unknown Source)
    at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
    at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
    at com.sun.deploy.net.DownloadEngine.getCachedFile(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: sun.security.ssl.X509TrustManagerImpl cannot be ast 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)
... 16 more

Is there a known workaround?

Electrodynamics answered 6/6, 2012 at 13:9 Comment(1)
Did you ever find more about this? This seems to be a known bug, and the only workaround I found was to uninstall the Java 7 JRE (I could keep the JDK for development though).Pistachio
N
1

This is an installation issue, plugin launch problem for multiple JRE. Reinstall all plugin with updated JRE. See bug database

Nora answered 16/12, 2012 at 10:52 Comment(0)
D
1

This may not apply well to your situation, but I found a solution for this for our problem. I modified the JNLP file to specify what JRE to use. In our case, the JNLP file had the following:

<j2se java-vm-args="-Xmx512m -Dsun.java2d.noddraw=true" version="1.6+"/>

And apparently, the "1.6+" allows for execution under 1.7. So I removed the "+", like so:

<j2se java-vm-args="-Xmx512m -Dsun.java2d.noddraw=true" version="1.6"/>

And now the application works fine. If you can change the JNLP file that gets served via your application URL, that would be best. In our case, that wasn't an option (the JNLP comes from a 3rd party software package), so I downloaded the JNLP, edited it, and now we launch the application by double-clicking the modified .jnlp file (or running the 1.6 javaws.exe on it).

Here is some documentation on the JNLP file format if you need further information.

Dichroscope answered 22/4, 2013 at 7:59 Comment(0)
I
0

In my case, the following worked to resolve this issue -

I needed to add the '*', which implies that the latest 1.6 JRE found on the machine will be picked up. For some reason, just using '1.6' did not work for me, and 1.7 continued to block the launch.

Intelsat answered 20/1, 2014 at 21:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.