Error: java.lang.IllegalStateException: zip file closed
Asked by HP:

Hey there,

My confluence throw the error:

2013-07-04 00:53:37,446 ERROR \[Finalizer\] \[osgi.container.felix.FelixOsgiContainerManager\] doLog JarContent: Unable to read bytes.  
java.lang.IllegalStateException: zip file closed  
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:632)  
at java.util.zip.ZipFile.getEntry(ZipFile.java:303)  
at java.util.jar.JarFile.getEntry(JarFile.java:226)  
at org.apache.felix.framework.util.JarFileX.getEntry(JarFileX.java:61)  
at org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:120)  
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1738)  
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716)  
at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)  
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
at org.apache.http.impl.conn.PoolingClientConnectionManager.shutdown(PoolingClientConnectionManager.java:284)  
at org.apache.http.impl.conn.PoolingClientConnectionManager.finalize(PoolingClientConnectionManager.java:121)  
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)  
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)  
at java.lang.ref.Finalizer.access$100(Finalizer.java:32)  
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:178)

Anyone has the same error?

I read this, <https://jira.atlassian.com/browse/CONF-7725> , the fix was on version 2. My version is 5.1.2.

Thanks.


Answers:
author: JohnA
body: Hi there,

From the look of it you have some corruption in your plugin caches, so to resolve this issue please perform the steps outlined below:

1. Shutdown Confluence  
2. Delete the following directories  
\<confluence-home\>/bundled-plugins folder  
\<confluence-home\>/plugin-cache folder  
\<confluence-home\>/plugins-osgi-cache folder  
\<confluence-home\>/plugins-temp folder  
3. Restart Confluence

The plugin caches will be refreshed during the startup so this is a safe procedure to perform, and it will more than likely resolve the issue that you are seeing here.

All the best,  
John

comments: author: HP
body: Sorry , suppose to give comment,

HI John,

We have tested the solution giving but no luck, we still see the error.

2013-07-04 07:59:50,381 ERROR \[Finalizer\] \[osgi.container.felix.FelixOsgiContainerManager\] doLog JarContent: Unable to read bytes.  
java.lang.IllegalStateException: zip file closed  
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:632)  
at java.util.zip.ZipFile.getEntry(ZipFile.java:303)  
at java.util.jar.JarFile.getEntry(JarFile.java:226)  
at org.apache.felix.framework.util.JarFileX.getEntry(JarFileX.java:61)  
at org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:120)  
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1738)  
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716)  
at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)  
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
at org.apache.http.impl.conn.PoolingClientConnectionManager.shutdown(PoolingClientConnectionManager.java:284)  
at org.apache.http.impl.conn.PoolingClientConnectionManager.finalize(PoolingClientConnectionManager.java:121)  
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)  
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)  
at java.lang.ref.Finalizer.access$100(Finalizer.java:32)  
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:178)

Any idea?


author: Michael S
body: The error is usually thrown when a bundled plugin is being overriden by a later version. It shouldn't cause any problems and can safely be ignored.

If you're actually seeing any drop in functionality please create a support request at [support.atlassian.com](http://support.atlassian.com).


author: vijaya reddy
body: We also facing this problem after upgrading to 5.1.3. How do i know, which plugin will effect with this error?

We tried the above solution already.

and how do we fix it?


author: HP
body: HI John,

We have tested the solution giving but no luck, we still see the error.

2013-07-04 07:59:50,381 ERROR \[Finalizer\] \[osgi.container.felix.FelixOsgiContainerManager\] doLog JarContent: Unable to read bytes.  
java.lang.IllegalStateException: zip file closed  
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:632)  
at java.util.zip.ZipFile.getEntry(ZipFile.java:303)  
at java.util.jar.JarFile.getEntry(JarFile.java:226)  
at org.apache.felix.framework.util.JarFileX.getEntry(JarFileX.java:61)  
at org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:120)  
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1738)  
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716)  
at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)  
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)  
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)  
at org.apache.http.impl.conn.PoolingClientConnectionManager.shutdown(PoolingClientConnectionManager.java:284)  
at org.apache.http.impl.conn.PoolingClientConnectionManager.finalize(PoolingClientConnectionManager.java:121)  
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)  
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:101)  
at java.lang.ref.Finalizer.access$100(Finalizer.java:32)  
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:178)

Any idea?


Tags: error