Hadoop ClassNotFoundException Hadoop ClassNotFoundException hadoop hadoop

Hadoop ClassNotFoundException


You should add all the jars found in /usr/lib/hadoop-0.xx/lib to avoid this kind of classpath issues.

To give you an idea, you can type hadoop classpath which will print you the class path needed to get the Hadoop jar and the required libraries.

In your case, you're missing the hadoop-common-0.xx.jar, so you should add this to the classpath and you should be good to go.


Does your main program need org.apache.commons.configuration.Configuration or should this be org.apache.hadoop.conf.Configuration?

Looks like Eclipse has auto-imported the wrong Configuration class, which isn't on the classpath when hadoop runs on your cluster.

Can you share your source code, in particular the com.sandbox.hadoop.Program class, main method?


I was facing the same problem.I solved it by adding commons-configuration-x.x.jar to my build path.It is under $HADOOP_HOME/lib.