Hadoop Common
  1. Hadoop Common
  2. HADOOP-8509

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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)
      
      1. HADOOP-8509.patch
        7 kB
        Matteo Bertozzi

        Activity

        Matteo Bertozzi created issue -
        Matteo Bertozzi made changes -
        Field Original Value New Value
        Attachment HADOOP-8509.patch [ 12532006 ]
        Matteo Bertozzi made changes -
        Attachment HADOOP-8509.patch [ 12532007 ]
        Matteo Bertozzi made changes -
        Attachment HADOOP-8509.patch [ 12532006 ]
        Matteo Bertozzi made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Alejandro Abdelnur made changes -
        Assignee Alejandro Abdelnur [ tucu00 ]
        Alejandro Abdelnur made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 2.0.1-alpha [ 12321441 ]
        Resolution Fixed [ 1 ]
        Arun C Murthy made changes -
        Fix Version/s 2.0.2-alpha [ 12322473 ]
        Fix Version/s 2.1.0-alpha [ 12321441 ]
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development