-
Bug
-
Resolution: Duplicate
-
P3
-
7u25, 8, 9
-
windows_7
FULL PRODUCT VERSION :
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Once launching a JNLP file, Java Web Start caches its contents. If then the contents of the file is updated on the web server, trying to launch the file might result in launching its old version instead. The problem happens only if running Java Web Start from command line. The problem does not happen if launching the JNLP file from browser.
REGRESSION. Last worked in version 7u17
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Have a JNLP file referring to a JAR file as a resource. The JNLP file should be available through some URL. Let it be http://some-url.com/test.jnlp. JAR file is test_version_1.jar.
2. Launch this JNLP file (from browser or from command line, it does not matter now). Make sure the Java application referred by JNLP file runs OK.
3. Rename the JAR file on the web server (to test_version_2.jar). Change the JNLP file so that it refer to the new JAR file name.
4. Try to launch the JNLP file from command line, e.g.
C:\Windows\SysWOW64\javaws.exe -Xnosplash http://some-url.com/test.jnlp
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Java application runs normally.
ACTUAL -
An error message appears: "Unable to launch the application". After pressing Details and going to the Exception tab, we see that Java Web Start tried to access the JAR file by its old name:
java.io.FileNotFoundException: http://some-url.com/test_version_1.jar
at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: http://some-url.com/test_version_1.jar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 12 more
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Following is the JNLP file we use. As for our Java application, it just shows a window with "Hello world" message.
-- JNLP file ----------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://some-url.com/" version="1.0" href="test.jnlp">
<information>
<title>Test</title>
<vendor>Some Company</vendor>
<description>Java Web Start Test</description>
<shortcut online="true" install="false"/>
</information>
<security>
<all-permissions/>
</security>
<update check="always" policy="always"/>
<resources>
<jar href="test_version_1.jar" download="eager" main="true"/>
</resources>
<application-desc main-class="Test"/>
</jnlp>
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Trying the above Step 4 once again results in success.
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b17)
Java HotSpot(TM) Client VM (build 23.25-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Once launching a JNLP file, Java Web Start caches its contents. If then the contents of the file is updated on the web server, trying to launch the file might result in launching its old version instead. The problem happens only if running Java Web Start from command line. The problem does not happen if launching the JNLP file from browser.
REGRESSION. Last worked in version 7u17
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Have a JNLP file referring to a JAR file as a resource. The JNLP file should be available through some URL. Let it be http://some-url.com/test.jnlp. JAR file is test_version_1.jar.
2. Launch this JNLP file (from browser or from command line, it does not matter now). Make sure the Java application referred by JNLP file runs OK.
3. Rename the JAR file on the web server (to test_version_2.jar). Change the JNLP file so that it refer to the new JAR file name.
4. Try to launch the JNLP file from command line, e.g.
C:\Windows\SysWOW64\javaws.exe -Xnosplash http://some-url.com/test.jnlp
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The Java application runs normally.
ACTUAL -
An error message appears: "Unable to launch the application". After pressing Details and going to the Exception tab, we see that Java Web Start tried to access the JAR file by its old name:
java.io.FileNotFoundException: http://some-url.com/test_version_1.jar
at sun.reflect.GeneratedConstructorAccessor1.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: http://some-url.com/test_version_1.jar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 12 more
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Following is the JNLP file we use. As for our Java application, it just shows a window with "Hello world" message.
-- JNLP file ----------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://some-url.com/" version="1.0" href="test.jnlp">
<information>
<title>Test</title>
<vendor>Some Company</vendor>
<description>Java Web Start Test</description>
<shortcut online="true" install="false"/>
</information>
<security>
<all-permissions/>
</security>
<update check="always" policy="always"/>
<resources>
<jar href="test_version_1.jar" download="eager" main="true"/>
</resources>
<application-desc main-class="Test"/>
</jnlp>
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Trying the above Step 4 once again results in success.
- duplicates
-
JDK-8034816 Old version of jnlp file is used
- Closed
- relates to
-
JDK-8034816 Old version of jnlp file is used
- Closed