Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8223811

When un-compressing jar, error is thrown: invalid LOC header (bad signature)

    Details

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Windows 10, SLES 12 SP2
      Java 1.8 212 and older version

      A DESCRIPTION OF THE PROBLEM :
      Jar is not compressed within several big files, two files over 4G and under same sub folder.
      When read entry inputstream, then would throw exception:
      java.util.zip.ZipException: invalid LOC header (bad signature)
      Or we can run "jarsigner -verify uncompress.jar", also report same error.

      Not only on windows, also on Linux (SUSE we tried)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Generate jar without compress, and maybe need several big files under some sub folder
      jar cf0 ../uncompress.jar *

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Can read the jar correctly
      ACTUAL -
      java.util.zip.ZipException: invalid LOC header (bad signature)

      ---------- BEGIN SOURCE ----------
      jarsigner -verify uncompress.jar
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      jar cf ../uncompress.jar *
      But the content of jar already compressed, don't want to compress again.

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              lancea Lance Andersen
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: