You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by "Cavus,M.,Fa. Post Direkt" <M....@postdirekt.de> on 2010/12/28 15:57:48 UTC

ClassNotFoundException

Hi,

I process this command: ./hadoop jar /home/userme/hd.jar
org.postdirekt.hadoop.WordCount gutenberg gutenberberg-output

 

and get this why? Because I have org.postdirekt.hadoop.Map in the jar
File.

 

10/12/28 15:28:30 INFO mapreduce.Job: Task Id :
attempt_201012281524_0002_m_000000_0, Status : FAILED

java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.postdirekt.hadoop.Map

            at
org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)

            at
org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
tImpl.java:167)

            at
org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)

            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)

            at org.apache.hadoop.mapred.Child$4.run(Child.java:217)

            at java.security.AccessController.doPrivileged(Native
Method)

            at javax.security.auth.Subject.doAs(Subject.java:396)

            at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
n.java:742)

            at org.apache.hadoop.mapred.Child.main(Child.java:211)

Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map

            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.m

10/12/28 15:28:41 INFO mapreduce.Job: Task Id :
attempt_201012281524_0002_m_000000_1, Status : FAILED

java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.postdirekt.hadoop.Map

            at
org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)

            at
org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
tImpl.java:167)

            at
org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)

            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)

            at org.apache.hadoop.mapred.Child$4.run(Child.java:217)

            at java.security.AccessController.doPrivileged(Native
Method)

            at javax.security.auth.Subject.doAs(Subject.java:396)

            at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
n.java:742)

            at org.apache.hadoop.mapred.Child.main(Child.java:211)

Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map

            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.m

10/12/28 15:28:53 INFO mapreduce.Job: Task Id :
attempt_201012281524_0002_m_000000_2, Status : FAILED

java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.postdirekt.hadoop.Map

            at
org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)

            at
org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
tImpl.java:167)

            at
org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)

            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)

            at org.apache.hadoop.mapred.Child$4.run(Child.java:217)

            at java.security.AccessController.doPrivileged(Native
Method)

            at javax.security.auth.Subject.doAs(Subject.java:396)

            at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
n.java:742)

            at org.apache.hadoop.mapred.Child.main(Child.java:211)

Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map

            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.m

10/12/28 15:29:09 INFO mapreduce.Job: Job complete:
job_201012281524_0002

10/12/28 15:29:09 INFO mapreduce.Job: Counters: 7

            Job Counters 

                        Data-local map tasks=4

                        Total time spent by all maps waiting after
reserving slots (ms)=0

                        Total time spent by all reduces waiting after
reserving slots (ms)=0

                        Failed map tasks=1

                        SLOTS_MILLIS_MAPS=45636

                        SLOTS_MILLIS_REDUCES=0

                        Launched map tasks=4

 


RE: ClassNotFoundException

Posted by "Cavus,M.,Fa. Post Direkt" <M....@postdirekt.de>.
Could you give me the command Harsh?

-----Original Message-----
From: Harsh J [mailto:qwertymaniac@gmail.com] 
Sent: Tuesday, December 28, 2010 5:15 PM
To: common-user@hadoop.apache.org
Subject: Re: ClassNotFoundException

In your job driving class (WordCount as per that command), have you
specified the jar by calling the Job.setJarByClass() [or on Stable
API, JobConf.setJarByClass()]?

I'm not sure if hadoop.util.RunJar automatically sends the jar across
for distribution to TaskTrackers.

On Tue, Dec 28, 2010 at 8:27 PM, Cavus,M.,Fa. Post Direkt
<M....@postdirekt.de> wrote:
> Hi,
>
> I process this command: ./hadoop jar /home/userme/hd.jar
> org.postdirekt.hadoop.WordCount gutenberg gutenberberg-output
>
>

-- 
Harsh J
www.harshj.com

Re: ClassNotFoundException

Posted by Harsh J <qw...@gmail.com>.
In your job driving class (WordCount as per that command), have you
specified the jar by calling the Job.setJarByClass() [or on Stable
API, JobConf.setJarByClass()]?

I'm not sure if hadoop.util.RunJar automatically sends the jar across
for distribution to TaskTrackers.

On Tue, Dec 28, 2010 at 8:27 PM, Cavus,M.,Fa. Post Direkt
<M....@postdirekt.de> wrote:
> Hi,
>
> I process this command: ./hadoop jar /home/userme/hd.jar
> org.postdirekt.hadoop.WordCount gutenberg gutenberberg-output
>
>

-- 
Harsh J
www.harshj.com

RE: ClassNotFoundException

Posted by "Black, Michael (IS)" <Mi...@ngc.com>.
I'm using hadoop-0.20.2 and I see this for my map/reduce class
 
com/ngc/asoc/recommend/Predict$Counter.class
com/ngc/asoc/recommend/Predict$R.class
com/ngc/asoc/recommend/Predict$M.class
com/ngc/asoc/recommend/Predict.class

I'm a java idiot so I don't know why they appear but perhaps you have similar?
 
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Northrop Grumman Information Systems
 

________________________________

From: Cavus,M.,Fa. Post Direkt [mailto:M.Cavus@postdirekt.de]
Sent: Tue 12/28/2010 9:21 AM
To: common-user@hadoop.apache.org
Subject: EXTERNAL:RE: ClassNotFoundException



Hi Praveen, I get this

2398 Mon Dec 27 16:19:16 CET org/postdirekt/hadoop/Map.class





RE: ClassNotFoundException

Posted by "Cavus,M.,Fa. Post Direkt" <M....@postdirekt.de>.
Hi Praveen, I get this

2398 Mon Dec 27 16:19:16 CET org/postdirekt/hadoop/Map.class


-----Original Message-----
From: Praveen Bathala [mailto:pbathalac@gmail.com] 
Sent: Tuesday, December 28, 2010 4:17 PM
To: common-user@hadoop.apache.org
Subject: Re: ClassNotFoundException

Just run this and make sure you really have the class file in jar

"jar -tvf | grep org.postdirekt.hadoop.Map"

if you don't get any output, the you don't have the class file in your
jar

+ Praveen

On Dec 28, 2010, at 9:12 AM, Cavus,M.,Fa. Post Direkt wrote:

> What must I do James?
> 
> -----Original Message-----
> From: James Seigel [mailto:james@tynt.com] 
> Sent: Tuesday, December 28, 2010 4:03 PM
> To: common-user@hadoop.apache.org
> Subject: Re: ClassNotFoundException
> 
> jar -tvf the jar file and double check that it is a class that is
> listed. Can't be in an included jar file.
> 
> Sent from my mobile. Please excuse the typos.
> 
> On 2010-12-28, at 7:58 AM, "Cavus,M.,Fa. Post Direkt"
> <M....@postdirekt.de> wrote:
> 
>> Hi,
>> 
>> I process this command: ./hadoop jar /home/userme/hd.jar
>> org.postdirekt.hadoop.WordCount gutenberg gutenberberg-output
>> 
>> 
>> 
>> and get this why? Because I have org.postdirekt.hadoop.Map in the jar
>> File.
>> 
>> 
>> 
>> 10/12/28 15:28:30 INFO mapreduce.Job: Task Id :
>> attempt_201012281524_0002_m_000000_0, Status : FAILED
>> 
>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>> org.postdirekt.hadoop.Map
>> 
>>           at
>>
org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>> 
>>           at
>> 
>
org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
>> tImpl.java:167)
>> 
>>           at
>> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>> 
>>           at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>> 
>>           at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>> 
>>           at java.security.AccessController.doPrivileged(Native
>> Method)
>> 
>>           at javax.security.auth.Subject.doAs(Subject.java:396)
>> 
>>           at
>> 
>
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
>> n.java:742)
>> 
>>           at org.apache.hadoop.mapred.Child.main(Child.java:211)
>> 
>> Caused by: java.lang.ClassNotFoundException:
org.postdirekt.hadoop.Map
>> 
>>           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.m
>> 
>> 10/12/28 15:28:41 INFO mapreduce.Job: Task Id :
>> attempt_201012281524_0002_m_000000_1, Status : FAILED
>> 
>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>> org.postdirekt.hadoop.Map
>> 
>>           at
>>
org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>> 
>>           at
>> 
>
org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
>> tImpl.java:167)
>> 
>>           at
>> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>> 
>>           at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>> 
>>           at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>> 
>>           at java.security.AccessController.doPrivileged(Native
>> Method)
>> 
>>           at javax.security.auth.Subject.doAs(Subject.java:396)
>> 
>>           at
>> 
>
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
>> n.java:742)
>> 
>>           at org.apache.hadoop.mapred.Child.main(Child.java:211)
>> 
>> Caused by: java.lang.ClassNotFoundException:
org.postdirekt.hadoop.Map
>> 
>>           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.m
>> 
>> 10/12/28 15:28:53 INFO mapreduce.Job: Task Id :
>> attempt_201012281524_0002_m_000000_2, Status : FAILED
>> 
>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>> org.postdirekt.hadoop.Map
>> 
>>           at
>>
org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>> 
>>           at
>> 
>
org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
>> tImpl.java:167)
>> 
>>           at
>> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>> 
>>           at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>> 
>>           at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>> 
>>           at java.security.AccessController.doPrivileged(Native
>> Method)
>> 
>>           at javax.security.auth.Subject.doAs(Subject.java:396)
>> 
>>           at
>> 
>
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
>> n.java:742)
>> 
>>           at org.apache.hadoop.mapred.Child.main(Child.java:211)
>> 
>> Caused by: java.lang.ClassNotFoundException:
org.postdirekt.hadoop.Map
>> 
>>           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.m
>> 
>> 10/12/28 15:29:09 INFO mapreduce.Job: Job complete:
>> job_201012281524_0002
>> 
>> 10/12/28 15:29:09 INFO mapreduce.Job: Counters: 7
>> 
>>           Job Counters
>> 
>>                       Data-local map tasks=4
>> 
>>                       Total time spent by all maps waiting after
>> reserving slots (ms)=0
>> 
>>                       Total time spent by all reduces waiting after
>> reserving slots (ms)=0
>> 
>>                       Failed map tasks=1
>> 
>>                       SLOTS_MILLIS_MAPS=45636
>> 
>>                       SLOTS_MILLIS_REDUCES=0
>> 
>>                       Launched map tasks=4
>> 
>> 
>> 


Re: ClassNotFoundException

Posted by Praveen Bathala <pb...@gmail.com>.
Just run this and make sure you really have the class file in jar

"jar -tvf | grep org.postdirekt.hadoop.Map"

if you don't get any output, the you don't have the class file in your jar

+ Praveen

On Dec 28, 2010, at 9:12 AM, Cavus,M.,Fa. Post Direkt wrote:

> What must I do James?
> 
> -----Original Message-----
> From: James Seigel [mailto:james@tynt.com] 
> Sent: Tuesday, December 28, 2010 4:03 PM
> To: common-user@hadoop.apache.org
> Subject: Re: ClassNotFoundException
> 
> jar -tvf the jar file and double check that it is a class that is
> listed. Can't be in an included jar file.
> 
> Sent from my mobile. Please excuse the typos.
> 
> On 2010-12-28, at 7:58 AM, "Cavus,M.,Fa. Post Direkt"
> <M....@postdirekt.de> wrote:
> 
>> Hi,
>> 
>> I process this command: ./hadoop jar /home/userme/hd.jar
>> org.postdirekt.hadoop.WordCount gutenberg gutenberberg-output
>> 
>> 
>> 
>> and get this why? Because I have org.postdirekt.hadoop.Map in the jar
>> File.
>> 
>> 
>> 
>> 10/12/28 15:28:30 INFO mapreduce.Job: Task Id :
>> attempt_201012281524_0002_m_000000_0, Status : FAILED
>> 
>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>> org.postdirekt.hadoop.Map
>> 
>>           at
>> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>> 
>>           at
>> 
> org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
>> tImpl.java:167)
>> 
>>           at
>> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>> 
>>           at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>> 
>>           at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>> 
>>           at java.security.AccessController.doPrivileged(Native
>> Method)
>> 
>>           at javax.security.auth.Subject.doAs(Subject.java:396)
>> 
>>           at
>> 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
>> n.java:742)
>> 
>>           at org.apache.hadoop.mapred.Child.main(Child.java:211)
>> 
>> Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map
>> 
>>           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.m
>> 
>> 10/12/28 15:28:41 INFO mapreduce.Job: Task Id :
>> attempt_201012281524_0002_m_000000_1, Status : FAILED
>> 
>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>> org.postdirekt.hadoop.Map
>> 
>>           at
>> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>> 
>>           at
>> 
> org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
>> tImpl.java:167)
>> 
>>           at
>> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>> 
>>           at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>> 
>>           at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>> 
>>           at java.security.AccessController.doPrivileged(Native
>> Method)
>> 
>>           at javax.security.auth.Subject.doAs(Subject.java:396)
>> 
>>           at
>> 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
>> n.java:742)
>> 
>>           at org.apache.hadoop.mapred.Child.main(Child.java:211)
>> 
>> Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map
>> 
>>           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.m
>> 
>> 10/12/28 15:28:53 INFO mapreduce.Job: Task Id :
>> attempt_201012281524_0002_m_000000_2, Status : FAILED
>> 
>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>> org.postdirekt.hadoop.Map
>> 
>>           at
>> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>> 
>>           at
>> 
> org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
>> tImpl.java:167)
>> 
>>           at
>> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>> 
>>           at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>> 
>>           at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>> 
>>           at java.security.AccessController.doPrivileged(Native
>> Method)
>> 
>>           at javax.security.auth.Subject.doAs(Subject.java:396)
>> 
>>           at
>> 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
>> n.java:742)
>> 
>>           at org.apache.hadoop.mapred.Child.main(Child.java:211)
>> 
>> Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map
>> 
>>           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.m
>> 
>> 10/12/28 15:29:09 INFO mapreduce.Job: Job complete:
>> job_201012281524_0002
>> 
>> 10/12/28 15:29:09 INFO mapreduce.Job: Counters: 7
>> 
>>           Job Counters
>> 
>>                       Data-local map tasks=4
>> 
>>                       Total time spent by all maps waiting after
>> reserving slots (ms)=0
>> 
>>                       Total time spent by all reduces waiting after
>> reserving slots (ms)=0
>> 
>>                       Failed map tasks=1
>> 
>>                       SLOTS_MILLIS_MAPS=45636
>> 
>>                       SLOTS_MILLIS_REDUCES=0
>> 
>>                       Launched map tasks=4
>> 
>> 
>> 


RE: ClassNotFoundException

Posted by "Cavus,M.,Fa. Post Direkt" <M....@postdirekt.de>.
What must I do James?

-----Original Message-----
From: James Seigel [mailto:james@tynt.com] 
Sent: Tuesday, December 28, 2010 4:03 PM
To: common-user@hadoop.apache.org
Subject: Re: ClassNotFoundException

jar -tvf the jar file and double check that it is a class that is
listed. Can't be in an included jar file.

Sent from my mobile. Please excuse the typos.

On 2010-12-28, at 7:58 AM, "Cavus,M.,Fa. Post Direkt"
<M....@postdirekt.de> wrote:

> Hi,
>
> I process this command: ./hadoop jar /home/userme/hd.jar
> org.postdirekt.hadoop.WordCount gutenberg gutenberberg-output
>
>
>
> and get this why? Because I have org.postdirekt.hadoop.Map in the jar
> File.
>
>
>
> 10/12/28 15:28:30 INFO mapreduce.Job: Task Id :
> attempt_201012281524_0002_m_000000_0, Status : FAILED
>
> java.lang.RuntimeException: java.lang.ClassNotFoundException:
> org.postdirekt.hadoop.Map
>
>            at
> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>
>            at
>
org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
> tImpl.java:167)
>
>            at
> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>
>            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>
>            at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>
>            at java.security.AccessController.doPrivileged(Native
> Method)
>
>            at javax.security.auth.Subject.doAs(Subject.java:396)
>
>            at
>
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
> n.java:742)
>
>            at org.apache.hadoop.mapred.Child.main(Child.java:211)
>
> Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map
>
>            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.m
>
> 10/12/28 15:28:41 INFO mapreduce.Job: Task Id :
> attempt_201012281524_0002_m_000000_1, Status : FAILED
>
> java.lang.RuntimeException: java.lang.ClassNotFoundException:
> org.postdirekt.hadoop.Map
>
>            at
> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>
>            at
>
org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
> tImpl.java:167)
>
>            at
> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>
>            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>
>            at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>
>            at java.security.AccessController.doPrivileged(Native
> Method)
>
>            at javax.security.auth.Subject.doAs(Subject.java:396)
>
>            at
>
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
> n.java:742)
>
>            at org.apache.hadoop.mapred.Child.main(Child.java:211)
>
> Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map
>
>            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.m
>
> 10/12/28 15:28:53 INFO mapreduce.Job: Task Id :
> attempt_201012281524_0002_m_000000_2, Status : FAILED
>
> java.lang.RuntimeException: java.lang.ClassNotFoundException:
> org.postdirekt.hadoop.Map
>
>            at
> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>
>            at
>
org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
> tImpl.java:167)
>
>            at
> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>
>            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>
>            at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>
>            at java.security.AccessController.doPrivileged(Native
> Method)
>
>            at javax.security.auth.Subject.doAs(Subject.java:396)
>
>            at
>
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
> n.java:742)
>
>            at org.apache.hadoop.mapred.Child.main(Child.java:211)
>
> Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map
>
>            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.m
>
> 10/12/28 15:29:09 INFO mapreduce.Job: Job complete:
> job_201012281524_0002
>
> 10/12/28 15:29:09 INFO mapreduce.Job: Counters: 7
>
>            Job Counters
>
>                        Data-local map tasks=4
>
>                        Total time spent by all maps waiting after
> reserving slots (ms)=0
>
>                        Total time spent by all reduces waiting after
> reserving slots (ms)=0
>
>                        Failed map tasks=1
>
>                        SLOTS_MILLIS_MAPS=45636
>
>                        SLOTS_MILLIS_REDUCES=0
>
>                        Launched map tasks=4
>
>
>

Re: ClassNotFoundException

Posted by James Seigel <ja...@tynt.com>.
jar -tvf the jar file and double check that it is a class that is
listed. Can't be in an included jar file.

Sent from my mobile. Please excuse the typos.

On 2010-12-28, at 7:58 AM, "Cavus,M.,Fa. Post Direkt"
<M....@postdirekt.de> wrote:

> Hi,
>
> I process this command: ./hadoop jar /home/userme/hd.jar
> org.postdirekt.hadoop.WordCount gutenberg gutenberberg-output
>
>
>
> and get this why? Because I have org.postdirekt.hadoop.Map in the jar
> File.
>
>
>
> 10/12/28 15:28:30 INFO mapreduce.Job: Task Id :
> attempt_201012281524_0002_m_000000_0, Status : FAILED
>
> java.lang.RuntimeException: java.lang.ClassNotFoundException:
> org.postdirekt.hadoop.Map
>
>            at
> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>
>            at
> org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
> tImpl.java:167)
>
>            at
> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>
>            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>
>            at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>
>            at java.security.AccessController.doPrivileged(Native
> Method)
>
>            at javax.security.auth.Subject.doAs(Subject.java:396)
>
>            at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
> n.java:742)
>
>            at org.apache.hadoop.mapred.Child.main(Child.java:211)
>
> Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map
>
>            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.m
>
> 10/12/28 15:28:41 INFO mapreduce.Job: Task Id :
> attempt_201012281524_0002_m_000000_1, Status : FAILED
>
> java.lang.RuntimeException: java.lang.ClassNotFoundException:
> org.postdirekt.hadoop.Map
>
>            at
> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>
>            at
> org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
> tImpl.java:167)
>
>            at
> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>
>            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>
>            at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>
>            at java.security.AccessController.doPrivileged(Native
> Method)
>
>            at javax.security.auth.Subject.doAs(Subject.java:396)
>
>            at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
> n.java:742)
>
>            at org.apache.hadoop.mapred.Child.main(Child.java:211)
>
> Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map
>
>            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.m
>
> 10/12/28 15:28:53 INFO mapreduce.Job: Task Id :
> attempt_201012281524_0002_m_000000_2, Status : FAILED
>
> java.lang.RuntimeException: java.lang.ClassNotFoundException:
> org.postdirekt.hadoop.Map
>
>            at
> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1128)
>
>            at
> org.apache.hadoop.mapreduce.task.JobContextImpl.getMapperClass(JobContex
> tImpl.java:167)
>
>            at
> org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:612)
>
>            at org.apache.hadoop.mapred.MapTask.run(MapTask.java:328)
>
>            at org.apache.hadoop.mapred.Child$4.run(Child.java:217)
>
>            at java.security.AccessController.doPrivileged(Native
> Method)
>
>            at javax.security.auth.Subject.doAs(Subject.java:396)
>
>            at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformatio
> n.java:742)
>
>            at org.apache.hadoop.mapred.Child.main(Child.java:211)
>
> Caused by: java.lang.ClassNotFoundException: org.postdirekt.hadoop.Map
>
>            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.m
>
> 10/12/28 15:29:09 INFO mapreduce.Job: Job complete:
> job_201012281524_0002
>
> 10/12/28 15:29:09 INFO mapreduce.Job: Counters: 7
>
>            Job Counters
>
>                        Data-local map tasks=4
>
>                        Total time spent by all maps waiting after
> reserving slots (ms)=0
>
>                        Total time spent by all reduces waiting after
> reserving slots (ms)=0
>
>                        Failed map tasks=1
>
>                        SLOTS_MILLIS_MAPS=45636
>
>                        SLOTS_MILLIS_REDUCES=0
>
>                        Launched map tasks=4
>
>
>