Trace:

Exception in thread "main" java.lang.ClassNotFoundException:
mapreduce.test.WordCount
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:148)

Code:
public class WordCount{ 
                
            public static void main(String[] args) throws Exception {
                try {
                                JobConf conf = new JobConf(WordCount.class);
                                  conf.setJobName("wordcount");

                                  conf.setOutputKeyClass(Text.class);
                                  conf.setOutputValueClass(IntWritable.class);

     conf.setMapperClass(Map.class);
                                  conf.setCombinerClass(Reduce.class);
     conf.setReducerClass(Reduce.class);

                                  conf.setInputFormat(TextInputFormat.class);
                                  conf.setOutputFormat(TextOutputFormat.class);

     FileInputFormat.setInputPaths(conf, new Path("input"));
     FileOutputFormat.setOutputPath(conf, new Path("output"));

     JobClient.runJob(conf);
                        }
                        catch (Exception t) {
                                // TODO Auto-generated catch block
                                t.printStackTrace();
                                System.out.println("Problem");
                        }
            }
                
}


Thank you!



TimRobertson100 wrote:
> 
> Can you post the entire error trace please?
> 
> On Fri, May 8, 2009 at 9:40 AM, George Pang <p09...@gmail.com> wrote:
>> Dear  users,
>> I got "ClassNotFoundException" when run the WordCount example on hadoop
>> using Eclipse.  Does anyone know where is the problem?
>>
>> Thank you!
>>
>> George
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ClassNotFoundException-tp23441528p23449216.html
Sent from the Hadoop core-user mailing list archive at Nabble.com.

Reply via email to