XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0M4
    • None
    • None

    Description

      Part of the Confluence application start-up failure described in HARMONY-5424.

      Confluence uses Avalaon, and as part of the start-up sequence is scanning the JAR file. Harmony ZIP code fails on this jar for some reason.

      Here's a simple reproducer (point to the confluence install dir as appropriate):

      import java.io.IOException;
      import java.util.Enumeration;
      import java.util.jar.JarEntry;
      import java.util.jar.JarFile;

      public class JarFileTest {

      public static void main(String[] args) throws IOException {

      JarFile jar = new JarFile(
      "/confluence-2.7.1-std/confluence/WEB-INF/lib/avalon-framework-4.2.0.jar");

      Enumeration<JarEntry> entries = jar.entries();
      while (entries.hasMoreElements())

      { JarEntry entry = entries.nextElement(); System.out.println(entry); }

      jar.close();
      }
      }

      On RI the above program prints out ..
      META-INF/
      META-INF/MANIFEST.MF
      org/
      org/apache/
      org/apache/avalon/
      org/apache/avalon/framework/
      org/apache/avalon/framework/activity/
      org/apache/avalon/framework/component/
      org/apache/avalon/framework/configuration/
      org/apache/avalon/framework/context/
      org/apache/avalon/framework/logger/
      org/apache/avalon/framework/parameters/
      org/apache/avalon/framework/service/
      org/apache/avalon/framework/thread/
      LICENSE.txt
      NOTICE.TXT
      org/apache/avalon/framework/activity/Disposable.class
      <and more>

      on Harmony the same program prints out
      META-INF/
      META-INF/MANIFEST.MF
      org/
      org/apache/
      org/apache/avalon/
      org/apache/avalon/framework/
      org/apache/avalon/framework/activity/
      org/apache/avalon/framework/component/
      org/apache/avalon/framework/configuration/
      org/apache/avalon/framework/context/
      org/apache/avalon/framework/logger/
      org/apache/avalon/framework/parameters/
      org/apache/avalon/framework/service/
      Exception in thread "main" java.lang.InternalError: Error -6 getting next zip entry
      at java.util.zip.ZipFile$ZFEnum.getNextEntry(Native Method)
      at java.util.zip.ZipFile$ZFEnum.nextElement(ZipFile.java:271)
      at java.util.zip.ZipFile$ZFEnum.nextElement(ZipFile.java:1)
      at java.util.jar.JarFile$1JarFileEnumerator.nextElement(JarFile.java:234)
      at java.util.jar.JarFile$1JarFileEnumerator.nextElement(JarFile.java:1)
      at JarFileTest.main(JarFileTest.java:15)

      Attachments

        Activity

          People

            tellison Tim Ellison
            tellison Tim Ellison
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: