Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-3368

Class loading fails on shutdown because zip is unreadable

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: framework-3.2.2
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dustin.schultz Dustin Schultz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: