You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@hadoop.apache.org by Peter Haidinyak <ph...@local.com> on 2010/11/23 17:31:28 UTC
ClassNotFoundException
Hi,
I just installed hadoop .21 (linux) and am trying to use the new API so I copied the example code from the Job.java source...
final Job job = new Job(new Configuration(true));
job.setJarByClass(SearchLogSorter.class);
job.setJobName("Search Log Sort");
when I compile and jar this and run it I get a
[hadoop@cala3stgiss01 hadoop]$ hadoop -jar jars/SearchLogSorter.jar a s
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/mapreduce/Job
at com.local.ctr.importer.SearchLogSorter.main(SearchLogSorter.java:96)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapreduce.Job
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:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 1 more
I executed 'hadoop classpath' and the 'hadoop-mapred-0.21.0.jar' is in the path.
Any ideas?
Also, will the jar be renamed to 'hadoop-mapreduce.*.jar in the future?
Thanks
-Pete