Hadoop Common
  1. Hadoop Common
  2. HADOOP-7999

"hadoop archive" fails with ClassNotFoundException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.23.1
    • Fix Version/s: 0.23.1
    • Component/s: scripts
    • Labels:
      None

      Description

      Running "hadoop archive" from a command prompt results in this error:

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/tools/HadoopArchives
      Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.tools.HadoopArchives
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      Could not find the main class: org.apache.hadoop.tools.HadoopArchives. Program will exit.

      The hadoop front-end script expects the TOOL_PATH environment variable to be set, but nothing provides a default value for it if it is not set. Since $TOOL_PATH expands to nothing, the hadoop-archives jar under share/hadoop/tools/lib isn't found, and we end up with a ClassNotFound exception.

        Activity

        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mahadev konar made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Target Version/s 0.23.1, 0.24.0 [ 12318884, 12317652 ] 0.24.0, 0.23.1 [ 12317652, 12318884 ]
        Resolution Fixed [ 1 ]
        Jason Lowe made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Target Version/s 0.24.0, 0.23.1 [ 12317652, 12318884 ]
        Jason Lowe made changes -
        Attachment HADOOP-7999.patch [ 12512237 ]
        Mahadev konar made changes -
        Field Original Value New Value
        Fix Version/s 0.23.1 [ 12318884 ]
        Affects Version/s 0.24.0 [ 12317652 ]
        Priority Major [ 3 ] Critical [ 2 ]
        Jason Lowe created issue -

          People

          • Assignee:
            Jason Lowe
            Reporter:
            Jason Lowe
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development