FAQ
have compiled the program without errors.

This is what my .jar file looks like:
Its name is Election.jar
Directory:hadoop@varun:~/
hadoop-0.20.1
Inside the jar these are the files
Election.class
Election$Reduce.class
Election$Map.class
META-INF/
Manifest-Version: 1.0
Created-By: 1.6.0_0 (Sun Microsystems Inc.)

This is how i run the job:
hadoop@varun:~/hadoop-0.20.1$ bin/hadoop jar Election.jar Election gutenberg
gutenberg-output

Exception in thread "main" java.lang.
NoClassDefFoundError: Election (wrong name: Election/Election)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.hadoop.util.RunJar.main(RunJar.java:149)

What am i doing wrong.
Sorry if this is not the appropriate list.I did not get an answer in the
common-user list.

--


Regards,
Varun Thacker
http://varunthacker.wordpress.com

Search Discussions

  • Varun Thacker at Mar 8, 2010 at 10:59 am
    have compiled the program without errors.

    This is what my .jar file looks like:
    Its name is Election.jar
    Directory:hadoop@varun:~/
    hadoop-0.20.1
    Inside the jar these are the files
    Election.class
    Election$Reduce.class
    Election$Map.class
    META-INF/
    Manifest-Version: 1.0
    Created-By: 1.6.0_0 (Sun Microsystems Inc.)

    This is how i run the job:
    hadoop@varun:~/hadoop-0.20.1$ bin/hadoop jar Election.jar Election gutenberg
    gutenberg-output

    Exception in thread "main" java.lang.
    NoClassDefFoundError: Election (wrong name: Election/Election)
    at java.lang.ClassLoader.
    defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:149)

    What am i doing wrong.
    Sorry if this is not the appropriate list.I did not get an answer in the
    common-user list.

    --


    Regards,
    Varun Thacker
    http://varunthacker.wordpress.com
  • Sonal Goyal at Mar 9, 2010 at 4:54 am
    Varun, where is your jar placed? Is it in hadoop-0.20.1 ?
    Thanks and Regards,
    Sonal

    On Mon, Mar 8, 2010 at 4:28 PM, Varun Thacker wrote:

    have compiled the program without errors.

    This is what my .jar file looks like:
    Its name is Election.jar
    Directory:hadoop@varun:~/
    hadoop-0.20.1
    Inside the jar these are the files
    Election.class
    Election$Reduce.class
    Election$Map.class
    META-INF/
    Manifest-Version: 1.0
    Created-By: 1.6.0_0 (Sun Microsystems Inc.)

    This is how i run the job:
    hadoop@varun:~/hadoop-0.20.1$ bin/hadoop jar Election.jar Election
    gutenberg
    gutenberg-output

    Exception in thread "main" java.lang.
    NoClassDefFoundError: Election (wrong name: Election/Election)
    at java.lang.ClassLoader.
    defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:149)

    What am i doing wrong.
    Sorry if this is not the appropriate list.I did not get an answer in the
    common-user list.

    --


    Regards,
    Varun Thacker
    http://varunthacker.wordpress.com

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedMar 8, '10 at 10:59a
activeMar 9, '10 at 4:54a
posts3
users3
websitehadoop.apache.org...
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase