United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7194301 java.lang.IllegalStateException: zip file closed
JDK-7194301 : java.lang.IllegalStateException: zip file closed

Details
Type:
Bug
Submit Date:
2012-08-27
Status:
Closed
Updated Date:
2013-04-20
Project Name:
JDK
Resolved Date:
2012-09-19
Component:
deploy
OS:
windows_xp
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) Client VM (build 23.2-b09, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
JRE 1.7.0_5 was updated to JRE 1.7.0_6

A DESCRIPTION OF THE PROBLEM :
We are using applets.
After updating from JRE 1.7.0_5 to JRE 1.7.0_6 some applets could not start any more.
In the stacktrace we see only jdk classes, none of our classes:
java.lang.IllegalStateException: zip file closed
	at java.util.zip.ZipFile.ensureOpen(Unknown Source)
	at java.util.zip.ZipFile.entries(Unknown Source)
	at java.util.jar.JarFile.entries(Unknown Source)
	at java.util.jar.JarVerifier.unsignedEntryNames(Unknown Source)
	at java.util.jar.JarVerifier.getCodeSources(Unknown Source)
	at java.util.jar.JarFile.getCodeSources(Unknown Source)
	at java.util.jar.JavaUtilJarAccessImpl.getCodeSources(Unknown Source)
	at com.sun.deploy.cache.DeployCacheJarAccessImpl.getCodeSources(Unknown Source)
	at com.sun.deploy.security.CPCallbackHandler$ParentCallback.openClassPathElement(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
	at com.sun.deploy.security.DeployURLClassPath.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 sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadClass(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)



REGRESSION.  Last worked in version 7

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Some of our applets are working as before, some are throwing these exceptions. Always the same applets throw exceptions.
The applets are working in case of calling the web page from a browser with an JRE 1.6.0_34 plugin or with a plugin <= 1.7.0_5


REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Don't use JRE 1.7.0_6 plugin.

                                    

Comments
PUBLIC COMMENTS

Send email to submitter for a test case to demo the problem.
                                     
2012-08-28
PUBLIC COMMENTS

http://mail.openjdk.java.net/pipermail/jdk7u-dev/2012-September/004327.html

I was not able to add additional information to CR 7194301. The status of 7194301 is actually: 2-Incomplete, Need More Info
The error occurs when using log4j on client side. It occurs since JRE 1.7.0_6.

Opening jar https://myMachine:3000/MyApplication/svcommon/data/jars/log4j-1.2.16.jar
Applet2ClassLoader: Policy.getPolicy() took 0 ms
security: Zertifikatkette mit CertPath-API validieren
security: Das Zertifikat ist nicht abgelaufen. Zeitstempelinformationen m??ssen nicht gepr??ft werden
security: Zust??ndigkeitslistendatei gefunden
security: Keine Pr??fung auf vertrauensw??rdige Erweiterung f??r dieses Zertifikat erforderlich
security: CRL-Unterst??tzung ist deaktiviert
security: OCSP-Unterst??tzung ist deaktiviert
security: Diese OCSP-End Entity-Validierung ist deaktiviert
security: Zertifikat wird im Zertifikatspeicher "Deployment denied" gesucht
security: Zertifikat wird im permanenten Deployment-Zertifikatspeicher gesucht
basic: Plugin2ClassLoader.getPermissions CeilingPolicy allPerms
URLClassPath.getResource("org/apache/log4j/Category.class")
URLClassPath.getResource("org/apache/log4j/Category.class")
URLClassPath.getResource("org/apache/log4j/spi/AppenderAttachable.class")
URLClassPath.getResource("org/apache/log4j/spi/AppenderAttachable.class")
URLClassPath.getResource("org/apache/log4j/Priority.class")
URLClassPath.getResource("org/apache/log4j/Priority.class")
URLClassPath.getResource("org/apache/log4j/Level.class")
URLClassPath.getResource("org/apache/log4j/Level.class")
URLClassPath.getResource("org/apache/log4j/LogManager.class")
URLClassPath.getResource("org/apache/log4j/LogManager.class")
URLClassPath.getResource("org/apache/log4j/spi/RootLogger.class")
URLClassPath.getResource("org/apache/log4j/spi/RootLogger.class")
URLClassPath.getResource("org/apache/log4j/spi/LoggerRepository.class")
URLClassPath.getResource("org/apache/log4j/spi/LoggerRepository.class")
URLClassPath.getResource("org/apache/log4j/spi/RepositorySelector.class")
URLClassPath.getResource("org/apache/log4j/spi/RepositorySelector.class")
URLClassPath.getResource("org/apache/log4j/Hierarchy.class")
URLClassPath.getResource("org/apache/log4j/Hierarchy.class")
URLClassPath.getResource("org/apache/log4j/spi/RendererSupport.class")
URLClassPath.getResource("org/apache/log4j/spi/RendererSupport.class")
URLClassPath.getResource("org/apache/log4j/spi/ThrowableRendererSupport.class")
URLClassPath.getResource("org/apache/log4j/spi/ThrowableRendererSupport.class")
URLClassPath.getResource("org/apache/log4j/ProvisionNode.class")
URLClassPath.getResource("org/apache/log4j/ProvisionNode.class")
URLClassPath.getResource("org/apache/log4j/spi/LoggerFactory.class")
URLClassPath.getResource("org/apache/log4j/spi/LoggerFactory.class")
URLClassPath.getResource("org/apache/log4j/or/RendererMap.class")
URLClassPath.getResource("org/apache/log4j/or/RendererMap.class")
URLClassPath.getResource("org/apache/log4j/or/ObjectRenderer.class")
URLClassPath.getResource("org/apache/log4j/or/ObjectRenderer.class")
URLClassPath.getResource("org/apache/log4j/or/DefaultRenderer.class")
URLClassPath.getResource("org/apache/log4j/or/DefaultRenderer.class")
URLClassPath.getResource("org/apache/log4j/DefaultCategoryFactory.class")
URLClassPath.getResource("org/apache/log4j/DefaultCategoryFactory.class")
URLClassPath.getResource("org/apache/log4j/spi/DefaultRepositorySelector.class")
URLClassPath.getResource("org/apache/log4j/spi/DefaultRepositorySelector.class")
URLClassPath.getResource("org/apache/log4j/helpers/OptionConverter.class")
URLClassPath.getResource("org/apache/log4j/helpers/OptionConverter.class")
URLClassPath.getResource("org/apache/log4j/spi/Configurator.class")
URLClassPath.getResource("org/apache/log4j/spi/Configurator.class")
URLClassPath.getResource("org/apache/log4j/helpers/Loader.class")
URLClassPath.getResource("org/apache/log4j/helpers/Loader.class")
URLClassPath.getResource("org/apache/log4j/helpers/LogLog.class")
URLClassPath.getResource("org/apache/log4j/helpers/LogLog.class")
Opening jar https://myMachine:3000/MyApplication/svcommon/data/jars/snmp4j-1.10.2.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/snmp4j-1.10.2.jar>
network: Verbindung von https://myMachine:3000/MyApplication/svcommon/data/jars/snmp4j-1.10.2.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/snmp4j-1.10.2.jar> mit Proxy=DIRECT wird hergestellt
network: https://myMachine:3000/MyApplication/svcommon/data/jars/snmp4j-1.10.2.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/snmp4j-1.10.2.jar> wird mit Cookie "JSESSIONID=iXT4E9-iP5PwFDhrMvM3LG8O.undefined; org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en" verbunden
network: Ressource wird heruntergeladen: https://myMachine:3000/MyApplication/svcommon/data/jars/snmp4j-1.10.2.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/snmp4j-1.10.2.jar>
            Content-Length: -1
            Content-Encoding: null
preloader: Delivering: DownloadEvent[type=load,loaded=65536, total=-1, percent=35]
preloader: Delivering: DownloadEvent[type=load,loaded=356133, total=-1, percent=45]
security: Datei mit der Liste vertrauensw??rdiger Librarys wurde nicht gefunden
security: Zertifikatkette mit CertPath-API validieren
security: Das Zertifikat ist nicht abgelaufen. Zeitstempelinformationen m??ssen nicht gepr??ft werden
security: Zust??ndigkeitslistendatei gefunden
security: Keine Pr??fung auf vertrauensw??rdige Erweiterung f??r dieses Zertifikat erforderlich
security: CRL-Unterst??tzung ist deaktiviert
security: OCSP-Unterst??tzung ist deaktiviert
security: Diese OCSP-End Entity-Validierung ist deaktiviert
security: Zertifikat wird im Zertifikatspeicher "Deployment denied" gesucht
security: Zertifikat wird im permanenten Deployment-Zertifikatspeicher gesucht
Opening jar https://myMachine:3000/MyApplication/svcommon/data/jars/dom4j-1.6.1.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/dom4j-1.6.1.jar>
network: Verbindung von https://myMachine:3000/MyApplication/svcommon/data/jars/dom4j-1.6.1.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/dom4j-1.6.1.jar> mit Proxy=DIRECT wird hergestellt
network: https://myMachine:3000/MyApplication/svcommon/data/jars/dom4j-1.6.1.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/dom4j-1.6.1.jar> wird mit Cookie "JSESSIONID=iXT4E9-iP5PwFDhrMvM3LG8O.undefined; org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en" verbunden
network: Ressource wird heruntergeladen: https://myMachine:3000/MyApplication/svcommon/data/jars/dom4j-1.6.1.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/dom4j-1.6.1.jar>
            Content-Length: -1
            Content-Encoding: null
preloader: Delivering: DownloadEvent[type=load,loaded=65536, total=-1, percent=54]
preloader: Delivering: DownloadEvent[type=load,loaded=327084, total=-1, percent=63]
security: Datei mit der Liste vertrauensw??rdiger Librarys wurde nicht gefunden
security: Zertifikatkette mit CertPath-API validieren
security: Das Zertifikat ist nicht abgelaufen. Zeitstempelinformationen m??ssen nicht gepr??ft werden
security: Zust??ndigkeitslistendatei gefunden
security: Keine Pr??fung auf vertrauensw??rdige Erweiterung f??r dieses Zertifikat erforderlich
security: CRL-Unterst??tzung ist deaktiviert
security: OCSP-Unterst??tzung ist deaktiviert
security: Diese OCSP-End Entity-Validierung ist deaktiviert
security: Zertifikat wird im Zertifikatspeicher "Deployment denied" gesucht
security: Zertifikat wird im permanenten Deployment-Zertifikatspeicher gesucht
Opening jar https://myMachine:3000/MyApplication/svcommon/data/jars/commons-codec-1.4.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/commons-codec-1.4.jar>
network: Verbindung von https://myMachine:3000/MyApplication/svcommon/data/jars/commons-codec-1.4.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/commons-codec-1.4.jar> mit Proxy=DIRECT wird hergestellt
network: https://myMachine:3000/MyApplication/svcommon/data/jars/commons-codec-1.4.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/commons-codec-1.4.jar> wird mit Cookie "JSESSIONID=iXT4E9-iP5PwFDhrMvM3LG8O.undefined; org.springframework.web.servlet.i18n.CookieLocaleResolver.LOCALE=en" verbunden
network: Ressource wird heruntergeladen: https://myMachine:3000/MyApplication/svcommon/data/jars/commons-codec-1.4.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/commons-codec-1.4.jar>
            Content-Length: -1
            Content-Encoding: null
preloader: Delivering: DownloadEvent[type=load,loaded=62451, total=-1, percent=81]
security: Datei mit der Liste vertrauensw??rdiger Librarys wurde nicht gefunden
security: Zertifikatkette mit CertPath-API validieren
security: Das Zertifikat ist nicht abgelaufen. Zeitstempelinformationen m??ssen nicht gepr??ft werden
security: Zust??ndigkeitslistendatei gefunden
security: Keine Pr??fung auf vertrauensw??rdige Erweiterung f??r dieses Zertifikat erforderlich
security: CRL-Unterst??tzung ist deaktiviert
security: OCSP-Unterst??tzung ist deaktiviert
security: Diese OCSP-End Entity-Validierung ist deaktiviert
security: Zertifikat wird im Zertifikatspeicher "Deployment denied" gesucht
security: Zertifikat wird im permanenten Deployment-Zertifikatspeicher gesucht
Opening jar https://myMachine:3000/MyApplication/svcommon/data/jars/snmp4j-1.10.2.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/snmp4j-1.10.2.jar>
Opening jar https://myMachine:3000/MyApplication/svcommon/data/jars/dom4j-1.6.1.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/dom4j-1.6.1.jar>
Opening jar https://myMachine:3000/MyApplication/svcommon/data/jars/commons-codec-1.4.jar<https://sanfrancisco.swdev.mch.fsc.net:3170/ServerView/svcommon/data/jars/commons-codec-1.4.jar>
URLClassPath.getResource("org/apache/log4j/PropertyConfigurator.class")
URLClassPath.getResource("org/apache/log4j/PropertyConfigurator.class")
URLClassPath.getResource("org/apache/log4j/helpers/FileWatchdog.class")
URLClassPath.getResource("org/apache/log4j/helpers/FileWatchdog.class")
URLClassPath.getResource("org/apache/log4j/PropertyWatchdog.class")
URLClassPath.getResource("org/apache/log4j/PropertyWatchdog.class")
URLClassPath.getResource("org/apache/log4j/Appender.class")
basic: Ausnahme: java.lang.ExceptionInInitializerError.
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
            at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.instantiateApplet(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)
Caused by: java.lang.ExceptionInInitializerError
            at org.apache.log4j.Logger.getLogger(Logger.java:104)
            at myApplication.om.sirius.ui.partition.PartitionViewApplet.<clinit>(PartitionViewApplet.java:42)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at java.lang.Class.newInstance0(Unknown Source)
            at java.lang.Class.newInstance(Unknown Source)
            at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter$1.run(Unknown Source)
            at java.awt.event.InvocationEvent.dispatch(Unknown Source)
            at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
            at java.awt.EventQueue.access$200(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.awt.EventQueue$3.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
            at java.awt.EventQueue.dispatchEvent(Unknown Source)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
            at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: zip file closed
            at java.util.zip.ZipFile.ensureOpen(Unknown Source)
            at java.util.zip.ZipFile.getEntry(Unknown Source)
            at java.util.jar.JarFile.getEntry(Unknown Source)
            at java.util.jar.JarFile.getJarEntry(Unknown Source)
            at com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source)
            at com.sun.deploy.security.DeployURLClassPath.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 sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
            at sun.plugin2.applet.Plugin2ClassLoader.loadClass(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 java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at org.apache.log4j.PropertyConfigurator.class$(PropertyConfigurator.java:572)
            at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:752)
            at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
            at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
            at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
            at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
            at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
            at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
            ... 23 more
Ignored exception: java.lang.RuntimeException: java.lang.ExceptionInInitializerError


Thanks
Baerbel
--
Baerbel Lindner
Fujitsu Technology Solutions
                                     
2012-09-06
EVALUATION

This happens when caching is disable and client code close inputstream from a JarURLConnection which had been opened with setUseCache(false).
This is regression from the performance fix using shared jars.
                                     
2012-09-13
Added SQE test cases:
http://sqe-rb.us.oracle.com/r/12343/
                                     
2012-10-09
Reproduced with 8b56. Verified with 8b57.
http://sqe-rb.us.oracle.com/r/12343/
                                     
2012-10-09



Hardware and Software, Engineered to Work Together