Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-8509

JarFinder duplicate entry: META-INF/MANIFEST.MF exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.23.1
    • Fix Version/s: 2.0.2-alpha
    • Component/s: util
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Calling JarFinder.getJar() throws an exception if user has a "META-INF/MANIFEST.MF" in the same directory of the .class specified.

      Jarfinder.getJar() call createJar() that always create a new Manifest and then add all the files contained in the .class directory.

      To reproduce the problem in a simple way you can create a SimpleClass.java in the same directory create a META-INF/MANIFEST.MF and then call JarFinder.getJar(SimpleClass.class)

      >> Caused by: java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF
      >> at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)
      >> at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)
      >> at org.apache.hadoop.util.JarFinder.zipDir(JarFinder.java:66)
      >> at org.apache.hadoop.util.JarFinder.zipDir(JarFinder.java:62)
      >> at org.apache.hadoop.util.JarFinder.zipDir(JarFinder.java:44)
      >> at org.apache.hadoop.util.JarFinder.createJar(JarFinder.java:93)
      >> at org.apache.hadoop.util.JarFinder.getJar(JarFinder.java:134)
      

        Attachments

        1. HADOOP-8509.patch
          7 kB
          Matteo Bertozzi

          Activity

            People

            • Assignee:
              tucu00 Alejandro Abdelnur
              Reporter:
              mbertozzi Matteo Bertozzi
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: