11

ClassNotFoundException, while running a sample Hadoop job

 2 years ago
source link: https://www.codesd.com/item/classnotfoundexception-while-running-a-sample-hadoop-job.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

ClassNotFoundException, while running a sample Hadoop job

advertisements

I have started a little something on hadoop. It is setup and running properly. Right now I am doing a single node / stand alone cluster. I am trying to run sample job as mentioned on http://hadoop.apache.org/common/docs/r0.18.3/mapred_tutorial.html

So far, program is correctly compiled, jar has been created, manifest added successfully. But when I try to run the job I get this error.

Exception in thread "main" java.lang.ClassNotFoundException: org.myorg.WordCount
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 java.lang.ClassLoader.loadClass(ClassLoader.java:247)
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)

I have copy pasted the exact same program as mentioned in link. But it's giving this error. This is the command line I hit.

[shantanu@shades1ld1 hadoop]$ bin/hadoop jar /home/shantanu/hadoop/src/examples/wordcount.jar org.myorg.WordCount /tmp/Hadoop_Jobs/ /tmp/Hadoop_Results

I have gone through numerous articles, but couldn't find an explanation for this, please help.


Are you sure that wordcount.jar contains the org.myorg.WordCount class?

Didn't you modify the package name?

Tags hadoop

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK