You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Dustin Schultz (Created) (JIRA)" <ji...@apache.org> on 2012/02/22 23:23:48 UTC
[jira] [Created] (KARAF-1221) Class loading fails on shutdown
because zip is unreadable
Class loading fails on shutdown because zip is unreadable
---------------------------------------------------------
Key: KARAF-1221
URL: https://issues.apache.org/jira/browse/KARAF-1221
Project: Karaf
Issue Type: Bug
Components: karaf-core
Affects Versions: 2.2.5
Reporter: Dustin Schultz
If a particular module executes a shutdown hook which loads a class at runtime, it will fail with NoClassDefFound errors because the classloader will be unable to load the class from the jar.
ERROR: JarContent: Unable to read bytes. (java.lang.IllegalStateException: zip file closed)
java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:415)
at java.util.zip.ZipFile.getEntry(ZipFile.java:160)
at org.apache.felix.framework.util.ZipFileX.getEntry(ZipFileX.java:52)
at org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:122)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1816)
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:727)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doDispose(IndexedDiskCache.java:920)
at
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KARAF-1221) Class loading fails on shutdown
because zip is unreadable
Posted by "Jean-Baptiste Onofré (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219189#comment-13219189 ]
Jean-Baptiste Onofré commented on KARAF-1221:
---------------------------------------------
This issue is not in Karaf but in Felix. Please fill a Jira in Felix.
> Class loading fails on shutdown because zip is unreadable
> ---------------------------------------------------------
>
> Key: KARAF-1221
> URL: https://issues.apache.org/jira/browse/KARAF-1221
> Project: Karaf
> Issue Type: Bug
> Components: karaf-core
> Affects Versions: 2.2.5
> Reporter: Dustin Schultz
>
> If a particular module executes a shutdown hook which loads a class at runtime, it will fail with NoClassDefFound errors because the classloader will be unable to load the class from the jar.
> ERROR: JarContent: Unable to read bytes. (java.lang.IllegalStateException: zip file closed)
> java.lang.IllegalStateException: zip file closed
> at java.util.zip.ZipFile.ensureOpen(ZipFile.java:415)
> at java.util.zip.ZipFile.getEntry(ZipFile.java:160)
> at org.apache.felix.framework.util.ZipFileX.getEntry(ZipFileX.java:52)
> at org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:122)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1816)
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:727)
> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doDispose(IndexedDiskCache.java:920)
> at
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (KARAF-1221) Class loading fails on shutdown
because zip is unreadable
Posted by "Jean-Baptiste Onofré (Resolved JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jean-Baptiste Onofré resolved KARAF-1221.
-----------------------------------------
Resolution: Not A Problem
Please, raise a Jira at Felix framework. The issue is not directly Karaf related.
> Class loading fails on shutdown because zip is unreadable
> ---------------------------------------------------------
>
> Key: KARAF-1221
> URL: https://issues.apache.org/jira/browse/KARAF-1221
> Project: Karaf
> Issue Type: Bug
> Components: karaf-core
> Affects Versions: 2.2.5
> Reporter: Dustin Schultz
>
> If a particular module executes a shutdown hook which loads a class at runtime, it will fail with NoClassDefFound errors because the classloader will be unable to load the class from the jar.
> ERROR: JarContent: Unable to read bytes. (java.lang.IllegalStateException: zip file closed)
> java.lang.IllegalStateException: zip file closed
> at java.util.zip.ZipFile.ensureOpen(ZipFile.java:415)
> at java.util.zip.ZipFile.getEntry(ZipFile.java:160)
> at org.apache.felix.framework.util.ZipFileX.getEntry(ZipFileX.java:52)
> at org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:122)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1816)
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:727)
> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doDispose(IndexedDiskCache.java:920)
> at
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (KARAF-1221) Class loading fails on shutdown
because zip is unreadable
Posted by "Andreas Pieber (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Pieber updated KARAF-1221:
----------------------------------
I experience the same problem from time to time; though I think it's a felix problem and nothing of karaf. Can you try to switch to equinox and check if the error still persists?
> Class loading fails on shutdown because zip is unreadable
> ---------------------------------------------------------
>
> Key: KARAF-1221
> URL: https://issues.apache.org/jira/browse/KARAF-1221
> Project: Karaf
> Issue Type: Bug
> Components: karaf-core
> Affects Versions: 2.2.5
> Reporter: Dustin Schultz
>
> If a particular module executes a shutdown hook which loads a class at runtime, it will fail with NoClassDefFound errors because the classloader will be unable to load the class from the jar.
> ERROR: JarContent: Unable to read bytes. (java.lang.IllegalStateException: zip file closed)
> java.lang.IllegalStateException: zip file closed
> at java.util.zip.ZipFile.ensureOpen(ZipFile.java:415)
> at java.util.zip.ZipFile.getEntry(ZipFile.java:160)
> at org.apache.felix.framework.util.ZipFileX.getEntry(ZipFileX.java:52)
> at org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:122)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1816)
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:727)
> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doDispose(IndexedDiskCache.java:920)
> at
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (KARAF-1221) Class loading fails on shutdown
because zip is unreadable
Posted by "Dustin Schultz (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/KARAF-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13219300#comment-13219300 ]
Dustin Schultz commented on KARAF-1221:
---------------------------------------
Thanks - filed https://issues.apache.org/jira/browse/FELIX-3368
> Class loading fails on shutdown because zip is unreadable
> ---------------------------------------------------------
>
> Key: KARAF-1221
> URL: https://issues.apache.org/jira/browse/KARAF-1221
> Project: Karaf
> Issue Type: Bug
> Components: karaf-core
> Affects Versions: 2.2.5
> Reporter: Dustin Schultz
>
> If a particular module executes a shutdown hook which loads a class at runtime, it will fail with NoClassDefFound errors because the classloader will be unable to load the class from the jar.
> ERROR: JarContent: Unable to read bytes. (java.lang.IllegalStateException: zip file closed)
> java.lang.IllegalStateException: zip file closed
> at java.util.zip.ZipFile.ensureOpen(ZipFile.java:415)
> at java.util.zip.ZipFile.getEntry(ZipFile.java:160)
> at org.apache.felix.framework.util.ZipFileX.getEntry(ZipFileX.java:52)
> at org.apache.felix.framework.cache.JarContent.getEntryAsBytes(JarContent.java:122)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1816)
> at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:727)
> at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
> at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> at org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCache.doDispose(IndexedDiskCache.java:920)
> at
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira