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

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        4m 25s 1 Matteo Bertozzi 13/Jun/12 18:50
        Patch Available Patch Available Resolved Resolved
        3h 1 Alejandro Abdelnur 13/Jun/12 21:50
        Resolved Resolved Closed Closed
        119d 20h 54m 1 Arun C Murthy 11/Oct/12 18:45
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Arun C Murthy made changes -
        Fix Version/s 2.0.2-alpha [ 12322473 ]
        Fix Version/s 2.1.0-alpha [ 12321441 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #1109 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1109/)
        HADOOP-8509. JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008)

        Result = FAILURE
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #1109 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/1109/ ) HADOOP-8509 . JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008) Result = FAILURE tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #1076 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1076/)
        HADOOP-8509. JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008)

        Result = SUCCESS
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #1076 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/1076/ ) HADOOP-8509 . JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008) Result = SUCCESS tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #2378 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2378/)
        HADOOP-8509. JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008)

        Result = FAILURE
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #2378 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/2378/ ) HADOOP-8509 . JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008) Result = FAILURE tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #2431 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2431/)
        HADOOP-8509. JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008)

        Result = SUCCESS
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #2431 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/2431/ ) HADOOP-8509 . JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008) Result = SUCCESS tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #2359 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2359/)
        HADOOP-8509. JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008)

        Result = SUCCESS
        tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008
        Files :

        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java
        • /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #2359 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/2359/ ) HADOOP-8509 . JarFinder duplicate entry: META-INF/MANIFEST.MF exception (tucu) (Revision 1350008) Result = SUCCESS tucu : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1350008 Files : /hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/JarFinder.java /hadoop/common/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestJarFinder.java
        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 ]
        Hide
        Alejandro Abdelnur added a comment -

        committed to trunk and branch-2

        Show
        Alejandro Abdelnur added a comment - committed to trunk and branch-2
        Hide
        Tom White added a comment -

        +1

        Show
        Tom White added a comment - +1
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12532007/HADOOP-8509.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 2 new or modified test files.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in hadoop-common-project/hadoop-common:

        org.apache.hadoop.fs.viewfs.TestViewFsTrash

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1118//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1118//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12532007/HADOOP-8509.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 2 new or modified test files. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 javadoc. The javadoc tool did not generate any warning messages. +1 eclipse:eclipse. The patch built with eclipse:eclipse. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests in hadoop-common-project/hadoop-common: org.apache.hadoop.fs.viewfs.TestViewFsTrash +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HADOOP-Build/1118//testReport/ Console output: https://builds.apache.org/job/PreCommit-HADOOP-Build/1118//console This message is automatically generated.
        Hide
        Alejandro Abdelnur added a comment -

        Matteo, thanks for creating the JIRA uploading the patch.

        Show
        Alejandro Abdelnur added a comment - Matteo, thanks for creating the JIRA uploading the patch.
        Alejandro Abdelnur made changes -
        Assignee Alejandro Abdelnur [ tucu00 ]
        Matteo Bertozzi made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Matteo Bertozzi made changes -
        Attachment HADOOP-8509.patch [ 12532006 ]
        Matteo Bertozzi made changes -
        Attachment HADOOP-8509.patch [ 12532007 ]
        Matteo Bertozzi made changes -
        Field Original Value New Value
        Attachment HADOOP-8509.patch [ 12532006 ]
        Hide
        Matteo Bertozzi added a comment -

        Attached a patch by Alejandro Abdelnur, that checks if Manifest file is already present in the user directory before create the new one.

        Show
        Matteo Bertozzi added a comment - Attached a patch by Alejandro Abdelnur, that checks if Manifest file is already present in the user directory before create the new one.
        Matteo Bertozzi created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development