You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-dev@hadoop.apache.org by am...@students.iiit.ac.in on 2009/09/07 14:34:43 UTC

0.20 - Getting instantiation Exception at ReflectionUtils.newInstance

Hi,

I have set up the hadoop 0.20 as mentioned at
http://hadoop.apache.org/common/docs/r0.20.0/quickstart.html

I have set up the config files as mentioned in the link. The start-all.sh
starts alright and i am able to see my task-tracker and namenode.

I may my job jar with classes for Mapper, reducer and partitioner. I have
complied my code along with hadoop core and common.cli jars.

when i run my code with command line:

aatiwari@AATIWARI-LAP /cygdrive/d/cloud/hadoop-0.20.0$ bin/hadoop jar
../sort.jar sort.Sort 2input 2output

I get the following error:

09/09/07 17:56:01 WARN mapred.JobClient: No job jar file set.  User
classes may not be found. See JobConf(Class) or JobConf#setJar(String).

Exception in thread "main" java.lang.RuntimeException:
java.lang.InstantiationException
        at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:115)
        at
org.apache.hadoop.mapred.JobClient.writeNewSplits(JobClient.java:882)
        at
org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:779)
        at org.apache.hadoop.mapreduce.Job.submit(Job.java:432)
        at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:447)
        at sort.Sort.main(Sort.java:94)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: java.lang.InstantiationException
        at
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance
(InstantiationExceptionConstructorAccessorImpl.java:30)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at
org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.ja
va:113)
        ... 10 more

Can anyone help me with whats going wrong?

Thanks!
AMol.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Re: 0.20 - Getting instantiation Exception at ReflectionUtils.newInstance

Posted by am...@students.iiit.ac.in.
Hi,

resolved the issue by changing the input format and output format classes
from FileInputFormat to TextInputFormat class. :)

Thanks!
Amol.

> Hi,
>
> I have set up the hadoop 0.20 as mentioned at
> http://hadoop.apache.org/common/docs/r0.20.0/quickstart.html
>
> I have set up the config files as mentioned in the link. The start-all.sh
> starts alright and i am able to see my task-tracker and namenode.
>
> I may my job jar with classes for Mapper, reducer and partitioner. I have
> complied my code along with hadoop core and common.cli jars.
>
> when i run my code with command line:
>
> aatiwari@AATIWARI-LAP /cygdrive/d/cloud/hadoop-0.20.0$ bin/hadoop jar
> ../sort.jar sort.Sort 2input 2output
>
> I get the following error:
>
> 09/09/07 17:56:01 WARN mapred.JobClient: No job jar file set.  User
> classes may not be found. See JobConf(Class) or JobConf#setJar(String).
>
> Exception in thread "main" java.lang.RuntimeException:
> java.lang.InstantiationException
>         at
> org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:115)
>         at
> org.apache.hadoop.mapred.JobClient.writeNewSplits(JobClient.java:882)
>         at
> org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:779)
>         at org.apache.hadoop.mapreduce.Job.submit(Job.java:432)
>         at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:447)
>         at sort.Sort.main(Sort.java:94)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
> Caused by: java.lang.InstantiationException
>         at
> sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance
> (InstantiationExceptionConstructorAccessorImpl.java:30)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at
> org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.ja
> va:113)
>         ... 10 more
>
> Can anyone help me with whats going wrong?
>
> Thanks!
> AMol.
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.