JDK-6635067 : Cache: IllegalStateException thrown from deep within caching code
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6u10
  • Priority: P4
  • Status: Resolved
  • Resolution: Cannot Reproduce
  • OS: generic
  • CPU: generic
  • Submitted: 2007-11-28
  • Updated: 2015-01-20
  • Resolved: 2015-01-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u60Resolved
Related Reports
Relates :  
Relates :  
Description
When running the test case from 6634129 with the new Java Plug-In, the following exception is thrown from deep within the deployment caching code:

Exception occurred during JavaNameSpace hasField operation:
java.lang.IllegalStateException: zip file closed
	at java.util.zip.ZipFile.ensureOpen(ZipFile.java:403)
	at java.util.zip.ZipFile.getEntry(ZipFile.java:148)
	at java.util.jar.JarFile.getEntry(JarFile.java:206)
	at com.sun.deploy.cache.CachedJarFile.getEntry(CachedJarFile.java:88)
	at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:114)
	at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(CachedJarURLConnection.java:189)
	at sun.net.www.protocol.jar.JarURLConnection.getContentLength(JarURLConnection.java:152)
	at sun.plugin.net.protocol.jar.CachedJarURLConnection.getContentLength(CachedJarURLConnection.java:322)
	at sun.plugin2.applet.Applet2ClassLoader.getBytes(Applet2ClassLoader.java:515)
	at sun.plugin2.applet.Applet2ClassLoader.access$600(Applet2ClassLoader.java:54)
	at sun.plugin2.applet.Applet2ClassLoader$2.run(Applet2ClassLoader.java:210)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:207)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)
	at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$JavaNameSpaceProxy.getJavaClass(LiveConnectSupport.java:745)
	at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$JavaNameSpaceProxy.hasField(LiveConnectSupport.java:677)
	at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$4.run(LiveConnectSupport.java:476)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo.doObjectOp(LiveConnectSupport.java:474)
	at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(LiveConnectSupport.java:802)
	at java.lang.Thread.run(Thread.java:619)

The test case uses an odd mechanism for accessing the content, which is probably why this problem has not been seen before. We should investigate further why this exception is being thrown from the caching code. It should not be -- this code needs to be 100% reliable.

To reproduce, use the Java Control Panel switch to enable the new plug-in, set the environment variable JPI_PLUGIN2_DEBUG=1 in the system Control Panel, and run the test case from 6634129 inside Firefox 3.