java.lang.IllegalStateException: zip file closed

JIRA | Mark Symons | 3 years ago
  1. 0

    {panel:title=*This issue has moved*} {color:red}This issue has been moved permanently to [Adaptavist's Product Support JIRA instance|https://productsupport.adaptavist.com/browse/GRV-388].{color} All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the [Can't access your account|https://productsupport.adaptavist.com/secure/ForgotLoginDetails.jspa] link in order to reset to a new password. {panel}Shutting down JIRA results in multiple occurrences of the following exception: {noformat} 2013-12-11 16:32:09,557 Thread-334 ERROR [osgi.container.felix.FelixOsgiContainerManager] JarContent: Unable to read bytes. java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:634) at java.util.zip.ZipFile.getEntry(ZipFile.java:305) 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:357) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:143) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at com.onresolve.jira.groovy.ScriptManagerImpl$_registerScriptedJqlFunctions_closure4.doCall(ScriptManagerImpl.groovy:152) <+3> (NativeMethodAccessorImpl.java:57) (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3491) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1406) at org.codehaus.groovy.runtime.dgm$150.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.ScriptManagerImpl.registerScriptedJqlFunctions(ScriptManagerImpl.groovy:148) <+3> (NativeMethodAccessorImpl.java:57) (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78) at com.onresolve.jira.groovy.ScriptManagerImpl.this$dist$invoke$1(ScriptManagerImpl.groovy) at com.onresolve.jira.groovy.ScriptManagerImpl$1.methodMissing(ScriptManagerImpl.groovy) <+3> (NativeMethodAccessorImpl.java:57) (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:811) at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1103) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1056) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137) at com.onresolve.jira.groovy.ScriptManagerImpl$1.run(ScriptManagerImpl.groovy:397) at java.lang.Thread.run(Thread.java:724) {noformat} The exceptions continue until such time as the JIRA service is killed manually. If Script Runner is disabled via UPM then it shuts down normally (single INFO event) and then JIRA can be shut down without problems (no need to stop the service manually). "zip file closed" errors have been reported in GRV-116 and GRV-134 but I think that those might have been caused by this UPM defect: [HttpClient Connections are not being closed|https://ecosystem.atlassian.net/browse/UPM-4227] Note: My JIRA servers also suffered from the UPM defect (so I was getting two sets of "zip file closed" exceptions" on JIRA shutdown) but I have upgraded UPM and tested and found that the UPM-exceptions have gone - leaving only the Script Runner exceptions.

    JIRA | 3 years ago | Mark Symons
    java.lang.IllegalStateException: zip file closed
  2. 0

    {panel:title=*This issue has moved*} {color:red}This issue has been moved permanently to [Adaptavist's Product Support JIRA instance|https://productsupport.adaptavist.com/browse/GRV-388].{color} All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the [Can't access your account|https://productsupport.adaptavist.com/secure/ForgotLoginDetails.jspa] link in order to reset to a new password. {panel}Shutting down JIRA results in multiple occurrences of the following exception: {noformat} 2013-12-11 16:32:09,557 Thread-334 ERROR [osgi.container.felix.FelixOsgiContainerManager] JarContent: Unable to read bytes. java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:634) at java.util.zip.ZipFile.getEntry(ZipFile.java:305) 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:357) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:143) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at com.onresolve.jira.groovy.ScriptManagerImpl$_registerScriptedJqlFunctions_closure4.doCall(ScriptManagerImpl.groovy:152) <+3> (NativeMethodAccessorImpl.java:57) (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at groovy.lang.Closure.call(Closure.java:412) at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3491) at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1406) at org.codehaus.groovy.runtime.dgm$150.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at com.onresolve.jira.groovy.ScriptManagerImpl.registerScriptedJqlFunctions(ScriptManagerImpl.groovy:148) <+3> (NativeMethodAccessorImpl.java:57) (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78) at com.onresolve.jira.groovy.ScriptManagerImpl.this$dist$invoke$1(ScriptManagerImpl.groovy) at com.onresolve.jira.groovy.ScriptManagerImpl$1.methodMissing(ScriptManagerImpl.groovy) <+3> (NativeMethodAccessorImpl.java:57) (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:811) at groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1103) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1056) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137) at com.onresolve.jira.groovy.ScriptManagerImpl$1.run(ScriptManagerImpl.groovy:397) at java.lang.Thread.run(Thread.java:724) {noformat} The exceptions continue until such time as the JIRA service is killed manually. If Script Runner is disabled via UPM then it shuts down normally (single INFO event) and then JIRA can be shut down without problems (no need to stop the service manually). "zip file closed" errors have been reported in GRV-116 and GRV-134 but I think that those might have been caused by this UPM defect: [HttpClient Connections are not being closed|https://ecosystem.atlassian.net/browse/UPM-4227] Note: My JIRA servers also suffered from the UPM defect (so I was getting two sets of "zip file closed" exceptions" on JIRA shutdown) but I have upgraded UPM and tested and found that the UPM-exceptions have gone - leaving only the Script Runner exceptions.

    JIRA | 3 years ago | Mark Symons
    java.lang.IllegalStateException: zip file closed
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      zip file closed

      at java.util.zip.ZipFile.ensureOpen()
    2. Java RT
      JarFile.getEntry
      1. java.util.zip.ZipFile.ensureOpen(ZipFile.java:634)
      2. java.util.zip.ZipFile.getEntry(ZipFile.java:305)
      3. java.util.jar.JarFile.getEntry(JarFile.java:226)
      3 frames
    3. Apache Felix Framework
      ModuleImpl$ModuleClassLoader.loadClass
      1. org.apache.felix.framework.util.JarFileX.getEntry(JarFileX.java:61)
      2. org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:120)
      3. org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1738)
      4. org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716)
      5. org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73)
      6. org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690)
      6 frames
    4. Java RT
      ClassLoader.loadClass
      1. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      1 frame
    5. Groovy
      AbstractCallSite.call
      1. org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:143)
      2. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
      3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      4. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
      4 frames
    6. com.onresolve.jira
      ScriptManagerImpl$_registerScriptedJqlFunctions_closure4.doCall
      1. com.onresolve.jira.groovy.ScriptManagerImpl$_registerScriptedJqlFunctions_closure4.doCall(ScriptManagerImpl.groovy:152)
      1 frame
    7. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Method.java:606)
      1 frame
    8. Groovy
      AbstractCallSite.call
      1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
      3. org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
      4. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
      5. groovy.lang.Closure.call(Closure.java:412)
      6. org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3491)
      7. org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1406)
      8. org.codehaus.groovy.runtime.dgm$150.invoke(Unknown Source)
      9. org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
      10. org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
      11. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
      12. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      13. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      13 frames
    9. com.onresolve.jira
      ScriptManagerImpl.registerScriptedJqlFunctions
      1. com.onresolve.jira.groovy.ScriptManagerImpl.registerScriptedJqlFunctions(ScriptManagerImpl.groovy:148)
      1 frame
    10. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Method.java:606)
      1 frame
    11. Groovy
      ScriptBytecodeAdapter.invokeMethodOnCurrentN
      1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
      3. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1054)
      4. org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
      4 frames
    12. com.onresolve.jira
      ScriptManagerImpl$1.methodMissing
      1. com.onresolve.jira.groovy.ScriptManagerImpl.this$dist$invoke$1(ScriptManagerImpl.groovy)
      2. com.onresolve.jira.groovy.ScriptManagerImpl$1.methodMissing(ScriptManagerImpl.groovy)
      2 frames
    13. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Method.java:606)
      1 frame
    14. Groovy
      AbstractCallSite.callCurrent
      1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      2. groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:811)
      3. groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1103)
      4. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1056)
      5. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:884)
      6. org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
      7. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
      8. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
      9. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)
      9 frames
    15. com.onresolve.jira
      ScriptManagerImpl$1.run
      1. com.onresolve.jira.groovy.ScriptManagerImpl$1.run(ScriptManagerImpl.groovy:397)
      1 frame
    16. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:724)
      1 frame