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

Created bundle JAR files cause java.util.zip.ZipException: Invalid CEN header

    XMLWordPrintableJSON

Details

    Description

      Just for the records: the maven-bundle-plugin before 5.1.5 seems to create defect ZIP(JAR files. This was undiscovered until a new check was introduced in recent versions of Java 11, 17 and 20+ which cause an ZipException when Java tries to load such a JAR file:

       
       

      java.util.zip.ZipException: Invalid CEN header (invalid zip64 extra data field size)
      at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1728)
      at java.base/java.util.zip.ZipFile$Source.checkExtraFields(ZipFile.java:1261)
      at java.base/java.util.zip.ZipFile$Source.checkAndAddEntry(ZipFile.java:1212)
      at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1667)
      at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:1445)
      at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1407)
      at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:716)
      at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:250)
      at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:179)
      at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:150)
      

       

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            jbug Jan Peter Stotz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: