-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
7u25
-
windows_7
FULL PRODUCT VERSION :
Java Plug-in 10.40.2.40
Using JRE version 1.7.0_40-b40 Java HotSpot(TM) Client VM
Issue first noticed in Java 7u25.
ADDITIONAL OS VERSION INFORMATION :
Windows 7 Enterprise 64-bit
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
An HTML page with an applet tag that includes the "cache_version" parameter results in an "IOException: Cannot find cached resource for URL" every time the applet is loaded. However, if the same applet tag without the "cache_version" param is used to load the applet initially, then no exception will occur if the parameter is subsequently added to the page.
The applet still proceeds to load and run correctly, and the jar is cached and not requested from the server on subsequent loads (according to network trace), but exception is extra noise in console, and many of our customers get unsettled when they see any type of exception in the console when running our product.
P.S. Appears to be the same exception reported as bug ID 8017081, which was closed as not reproducible.
REGRESSION. Last worked in version 7u17
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a trivial applet and package it into a jar file. Create an HTML page to load the applet. For example:
<html>
<body>
<applet code="Clock" codebase="." height="100" width="150" name="Clock">
<param name="cache_archive" value="Clock.jar" >
<param name="cache_version" value="0.0.0.1">
</applet>
</body>
</html>
The important parameter in the applet tag above is "cache_version". The specific value doesn't matter, but the parameter must be present and have a version specified.
In the Java control panel, on Advanced tab, check Enable Tracing.
Browse to the URL to load the HTML page and applet. When the applet loads, Java console will contain the IOException.
Now, open the Java control panel, click the View button under Temporary Internet Files, and delete the cached jar file. In the HTML page, remove the "cache_version" parameter. Load the HTML page again. No exception will be thrown, and the jar will get cached by the Plug-in but with no version number (as expected, since
"cache_version" is absent).
If you then add back the "cache_version" parameter to the HTML page and load the HTML page again, the applet will load and no exception will get thrown. Further, if you go to the Java control panel and click View, you'll find two cached jars, one with a version and one without. From here on out, loading the HTML page with the "cache-version" parameter present will load the applet without any exceptions thrown.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Applet tag containing a "cache_version" parameter should load without throwing any exception, even when applet has not previously been encountered.
ACTUAL -
IOException: Cannot find cached resource for URL
ERROR MESSAGES/STACK TRACES THAT OCCUR :
network: Created version ID: 0.0.0.1
network: Created version ID: 0.0.0.1
security: blacklist: hasBeenModifiedSince 1378478456582 (we have 1378408850694)
network: Cache entry not found [url: http://server.com/session/Clock.jar, version: null]
java.io.IOException: Cannot find cached resource for URL: http://server.com/session/Clock.jar
at com.sun.deploy.cache.Cache.getCachedResourceFilePath(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getCachedResourceFilePath(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.getSignedJNLPBits(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getPermissions(Unknown Source)
at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.access$100(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 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)
security: Grant socket perm for http://server.com/session/Clock.jar : java.security.Permissions@710a3b (
("java.net.SocketPermission" "server.com" "connect,accept,resolve")
)
security: blacklist: hasBeenModifiedSince 1378478456582 (we have 1378408850694)
network: Cache entry not found [url: http://server.com/session/Clock.jar, version: null]
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Turn off "Keep temporary files on my computer" in control panel. Remove "cache_version" parameter.
Java Plug-in 10.40.2.40
Using JRE version 1.7.0_40-b40 Java HotSpot(TM) Client VM
Issue first noticed in Java 7u25.
ADDITIONAL OS VERSION INFORMATION :
Windows 7 Enterprise 64-bit
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
An HTML page with an applet tag that includes the "cache_version" parameter results in an "IOException: Cannot find cached resource for URL" every time the applet is loaded. However, if the same applet tag without the "cache_version" param is used to load the applet initially, then no exception will occur if the parameter is subsequently added to the page.
The applet still proceeds to load and run correctly, and the jar is cached and not requested from the server on subsequent loads (according to network trace), but exception is extra noise in console, and many of our customers get unsettled when they see any type of exception in the console when running our product.
P.S. Appears to be the same exception reported as bug ID 8017081, which was closed as not reproducible.
REGRESSION. Last worked in version 7u17
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a trivial applet and package it into a jar file. Create an HTML page to load the applet. For example:
<html>
<body>
<applet code="Clock" codebase="." height="100" width="150" name="Clock">
<param name="cache_archive" value="Clock.jar" >
<param name="cache_version" value="0.0.0.1">
</applet>
</body>
</html>
The important parameter in the applet tag above is "cache_version". The specific value doesn't matter, but the parameter must be present and have a version specified.
In the Java control panel, on Advanced tab, check Enable Tracing.
Browse to the URL to load the HTML page and applet. When the applet loads, Java console will contain the IOException.
Now, open the Java control panel, click the View button under Temporary Internet Files, and delete the cached jar file. In the HTML page, remove the "cache_version" parameter. Load the HTML page again. No exception will be thrown, and the jar will get cached by the Plug-in but with no version number (as expected, since
"cache_version" is absent).
If you then add back the "cache_version" parameter to the HTML page and load the HTML page again, the applet will load and no exception will get thrown. Further, if you go to the Java control panel and click View, you'll find two cached jars, one with a version and one without. From here on out, loading the HTML page with the "cache-version" parameter present will load the applet without any exceptions thrown.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Applet tag containing a "cache_version" parameter should load without throwing any exception, even when applet has not previously been encountered.
ACTUAL -
IOException: Cannot find cached resource for URL
ERROR MESSAGES/STACK TRACES THAT OCCUR :
network: Created version ID: 0.0.0.1
network: Created version ID: 0.0.0.1
security: blacklist: hasBeenModifiedSince 1378478456582 (we have 1378408850694)
network: Cache entry not found [url: http://server.com/session/Clock.jar, version: null]
java.io.IOException: Cannot find cached resource for URL: http://server.com/session/Clock.jar
at com.sun.deploy.cache.Cache.getCachedResourceFilePath(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getCachedResourceFilePath(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.getSignedJNLPBits(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getPermissions(Unknown Source)
at java.security.SecureClassLoader.getProtectionDomain(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.defineClassHelper(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.access$100(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 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)
security: Grant socket perm for http://server.com/session/Clock.jar : java.security.Permissions@710a3b (
("java.net.SocketPermission" "server.com" "connect,accept,resolve")
)
security: blacklist: hasBeenModifiedSince 1378478456582 (we have 1378408850694)
network: Cache entry not found [url: http://server.com/session/Clock.jar, version: null]
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Turn off "Keep temporary files on my computer" in control panel. Remove "cache_version" parameter.
- relates to
-
JDK-8146292 Exception after no-cache is demanded by a Web Server
-
- Closed
-