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 bharath vissapragada <bh...@students.iiit.ac.in> on 2009/06/15 11:39:38 UTC

java.lang.ClassNotFoundException

Hi all ,

When i try to run my own progam (jar file)  i get the following error.

java.lang.ClassNotFoundException : <file-Name>.class
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
    at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
    at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68


Can anyone tell me the reason(s) for this ..

Thanks in advance

Re: java.lang.ClassNotFoundException

Posted by zhaoren liu <ph...@gmail.com>.
Make sure you launch as:

        bin/hadoop jar hadoop-*-examples.jar grep input output 'dfs[a-z.]+'
Not
        bin/hadoop -jar hadoop-*-examples.jar grep input output 'dfs[a-z.]+'


On Mon, Jun 15, 2009 at 8:24 PM, jason hadoop <ja...@gmail.com>wrote:

> Your class is not in your jar, or your jar is not avialable in the hadoop
> class path.
>
> On Mon, Jun 15, 2009 at 2:39 AM, bharath vissapragada <
> bharat_v@students.iiit.ac.in> wrote:
>
> > Hi all ,
> >
> > When i try to run my own progam (jar file)  i get the following error.
> >
> > java.lang.ClassNotFoundException : <file-Name>.class
> >    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
> >    at java.security.AccessController.doPrivileged(Native Method)
> >    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
> >    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
> >    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
> >    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
> >    at java.lang.Class.forName0(Native Method)
> >    at java.lang.Class.forName(Class.java:264)
> >    at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
> >    at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
> >    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
> >    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
> >    at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68
> >
> >
> > Can anyone tell me the reason(s) for this ..
> >
> > Thanks in advance
> >
>
>
>
> --
> Pro Hadoop, a book to guide you from beginner to hadoop mastery,
> http://www.apress.com/book/view/9781430219422
> www.prohadoopbook.com a community for Hadoop Professionals
>

Re: java.lang.ClassNotFoundException

Posted by jason hadoop <ja...@gmail.com>.
Your class is not in your jar, or your jar is not avialable in the hadoop
class path.

On Mon, Jun 15, 2009 at 2:39 AM, bharath vissapragada <
bharat_v@students.iiit.ac.in> wrote:

> Hi all ,
>
> When i try to run my own progam (jar file)  i get the following error.
>
> java.lang.ClassNotFoundException : <file-Name>.class
>    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
>    at java.security.AccessController.doPrivileged(Native Method)
>    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
>    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
>    at java.lang.Class.forName0(Native Method)
>    at java.lang.Class.forName(Class.java:264)
>    at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
>    at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
>    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>    at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68
>
>
> Can anyone tell me the reason(s) for this ..
>
> Thanks in advance
>



-- 
Pro Hadoop, a book to guide you from beginner to hadoop mastery,
http://www.apress.com/book/view/9781430219422
www.prohadoopbook.com a community for Hadoop Professionals