You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Venkat Ramakrishnan <ve...@gmail.com> on 2014/12/25 11:47:55 UTC

ClassNotFoundException while running pig in local mode

Hi all,

I am getting the following error while running pig in local mode (pig -X
local) :

The system cannot find the path specified.
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.apache.pig.Main.<clinit>(Main.java:106)
Caused by: java.lang.ClassNotFoundException:
org.apache.commons.logging.LogFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
org/apache/hadoop/fs/LocalFileSystem
at org.apache.pig.Main$1.run(Main.java:101)
Caused by: java.lang.ClassNotFoundException:
org.apache.hadoop.fs.LocalFileSystem
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 1 more
Exception in thread "main"


Can someone tell me how to resolve this?

Thanks,
Venkat.

Re: ClassNotFoundException while running pig in local mode

Posted by inelu nagamallikarjuna <ma...@gmail.com>.
Hi,

Add all the required jars to the PIG CLASSPATH variable, It will resolve
the issue.

Thanks
Naga

On Fri, Dec 26, 2014 at 3:06 PM, Venkat Ramakrishnan <
venkat.architect@gmail.com> wrote:

> Thanks Praveen. I am running pig-14 on Windows 7.
>
> Can anyone confirm if Hadoop is really required for Pig local?
> If not, should I file an enhancement request?
>
> Thx,
> Venkat.
>
>
> On Fri, Dec 26, 2014 at 2:51 PM, Praveen R <pr...@sigmoidanalytics.com>
> wrote:
>
> > I usually have hadoop configured on the system even when using pig in
> local
> > mode and don't remember running pig without hadoop.
> >
> > It could be working on versions pig-13 or prior since it used to ship all
> > hadoop jars along with the release, but with pig-14 hadoop jars are no
> > longer shipped (believe this is to have a lighter packaging).
> >
> > Regards,
> > Praveen
> >
> > On Fri, Dec 26, 2014 at 2:36 PM, Venkat Ramakrishnan <
> > venkat.architect@gmail.com> wrote:
> >
> > > Thanks Praveen. Is Hadoop required for running pig local ?
> > > I read in a couple of places on the web saying that hadoop
> > > is not required for local mode...
> > >
> > > - Venkat.
> > >
> > > On Fri, Dec 26, 2014 at 1:44 PM, Praveen R <
> praveen@sigmoidanalytics.com
> > >
> > > wrote:
> > >
> > > > Looks like pig isn't able to find the hadoop jars. Could you try
> > putting
> > > > hadoop on the system i.e. have hadoop command in the environment
> path.
> > > >
> > > > Regards,
> > > > Praveen
> > > >
> > > > On Thu, Dec 25, 2014 at 4:17 PM, Venkat Ramakrishnan <
> > > > venkat.architect@gmail.com> wrote:
> > > >
> > > > > Hi all,
> > > > >
> > > > > I am getting the following error while running pig in local mode
> (pig
> > > -X
> > > > > local) :
> > > > >
> > > > > The system cannot find the path specified.
> > > > > java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
> > > > > at org.apache.pig.Main.<clinit>(Main.java:106)
> > > > > Caused by: java.lang.ClassNotFoundException:
> > > > > org.apache.commons.logging.LogFactory
> > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> > > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> > > > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > > > > ... 1 more
> > > > > Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
> > > > > org/apache/hadoop/fs/LocalFileSystem
> > > > > at org.apache.pig.Main$1.run(Main.java:101)
> > > > > Caused by: java.lang.ClassNotFoundException:
> > > > > org.apache.hadoop.fs.LocalFileSystem
> > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> > > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> > > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> > > > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > > > > ... 1 more
> > > > > Exception in thread "main"
> > > > >
> > > > >
> > > > > Can someone tell me how to resolve this?
> > > > >
> > > > > Thanks,
> > > > > Venkat.
> > > > >
> > > >
> > >
> >
>



-- 
Thanks and Regards
Nagamallikarjuna

Re: ClassNotFoundException while running pig in local mode

Posted by Venkat Ramakrishnan <ve...@gmail.com>.
Praveen,

With Pig 0.13.0 on Windows 7, pig -x local is giving the
grunt prompt without any exceptions. Thanks for your
suggestion.  I will use 0.13.0 for the time-being, so that
I can proceed with my work.

I will upgrade 0.14.0 once someone responds to whether the
jar files are missing, and why that's an issue.

Thanks,
Venkat.




On Fri, Dec 26, 2014 at 3:06 PM, Venkat Ramakrishnan <
venkat.architect@gmail.com> wrote:

> Thanks Praveen. I am running pig-14 on Windows 7.
>
> Can anyone confirm if Hadoop is really required for Pig local?
> If not, should I file an enhancement request?
>
> Thx,
> Venkat.
>
>
> On Fri, Dec 26, 2014 at 2:51 PM, Praveen R <pr...@sigmoidanalytics.com>
> wrote:
>
>> I usually have hadoop configured on the system even when using pig in
>> local
>> mode and don't remember running pig without hadoop.
>>
>> It could be working on versions pig-13 or prior since it used to ship all
>> hadoop jars along with the release, but with pig-14 hadoop jars are no
>> longer shipped (believe this is to have a lighter packaging).
>>
>> Regards,
>> Praveen
>>
>> On Fri, Dec 26, 2014 at 2:36 PM, Venkat Ramakrishnan <
>> venkat.architect@gmail.com> wrote:
>>
>> > Thanks Praveen. Is Hadoop required for running pig local ?
>> > I read in a couple of places on the web saying that hadoop
>> > is not required for local mode...
>> >
>> > - Venkat.
>> >
>> > On Fri, Dec 26, 2014 at 1:44 PM, Praveen R <
>> praveen@sigmoidanalytics.com>
>> > wrote:
>> >
>> > > Looks like pig isn't able to find the hadoop jars. Could you try
>> putting
>> > > hadoop on the system i.e. have hadoop command in the environment path.
>> > >
>> > > Regards,
>> > > Praveen
>> > >
>> > > On Thu, Dec 25, 2014 at 4:17 PM, Venkat Ramakrishnan <
>> > > venkat.architect@gmail.com> wrote:
>> > >
>> > > > Hi all,
>> > > >
>> > > > I am getting the following error while running pig in local mode
>> (pig
>> > -X
>> > > > local) :
>> > > >
>> > > > The system cannot find the path specified.
>> > > > java.lang.NoClassDefFoundError:
>> org/apache/commons/logging/LogFactory
>> > > > at org.apache.pig.Main.<clinit>(Main.java:106)
>> > > > Caused by: java.lang.ClassNotFoundException:
>> > > > org.apache.commons.logging.LogFactory
>> > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
>> > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
>> > > > at java.security.AccessController.doPrivileged(Native Method)
>> > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
>> > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>> > > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>> > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> > > > ... 1 more
>> > > > Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
>> > > > org/apache/hadoop/fs/LocalFileSystem
>> > > > at org.apache.pig.Main$1.run(Main.java:101)
>> > > > Caused by: java.lang.ClassNotFoundException:
>> > > > org.apache.hadoop.fs.LocalFileSystem
>> > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
>> > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
>> > > > at java.security.AccessController.doPrivileged(Native Method)
>> > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
>> > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>> > > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>> > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>> > > > ... 1 more
>> > > > Exception in thread "main"
>> > > >
>> > > >
>> > > > Can someone tell me how to resolve this?
>> > > >
>> > > > Thanks,
>> > > > Venkat.
>> > > >
>> > >
>> >
>>
>
>

Re: ClassNotFoundException while running pig in local mode

Posted by Venkat Ramakrishnan <ve...@gmail.com>.
Thanks Praveen. I am running pig-14 on Windows 7.

Can anyone confirm if Hadoop is really required for Pig local?
If not, should I file an enhancement request?

Thx,
Venkat.


On Fri, Dec 26, 2014 at 2:51 PM, Praveen R <pr...@sigmoidanalytics.com>
wrote:

> I usually have hadoop configured on the system even when using pig in local
> mode and don't remember running pig without hadoop.
>
> It could be working on versions pig-13 or prior since it used to ship all
> hadoop jars along with the release, but with pig-14 hadoop jars are no
> longer shipped (believe this is to have a lighter packaging).
>
> Regards,
> Praveen
>
> On Fri, Dec 26, 2014 at 2:36 PM, Venkat Ramakrishnan <
> venkat.architect@gmail.com> wrote:
>
> > Thanks Praveen. Is Hadoop required for running pig local ?
> > I read in a couple of places on the web saying that hadoop
> > is not required for local mode...
> >
> > - Venkat.
> >
> > On Fri, Dec 26, 2014 at 1:44 PM, Praveen R <praveen@sigmoidanalytics.com
> >
> > wrote:
> >
> > > Looks like pig isn't able to find the hadoop jars. Could you try
> putting
> > > hadoop on the system i.e. have hadoop command in the environment path.
> > >
> > > Regards,
> > > Praveen
> > >
> > > On Thu, Dec 25, 2014 at 4:17 PM, Venkat Ramakrishnan <
> > > venkat.architect@gmail.com> wrote:
> > >
> > > > Hi all,
> > > >
> > > > I am getting the following error while running pig in local mode (pig
> > -X
> > > > local) :
> > > >
> > > > The system cannot find the path specified.
> > > > java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> > > > at org.apache.pig.Main.<clinit>(Main.java:106)
> > > > Caused by: java.lang.ClassNotFoundException:
> > > > org.apache.commons.logging.LogFactory
> > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> > > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > > > ... 1 more
> > > > Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
> > > > org/apache/hadoop/fs/LocalFileSystem
> > > > at org.apache.pig.Main$1.run(Main.java:101)
> > > > Caused by: java.lang.ClassNotFoundException:
> > > > org.apache.hadoop.fs.LocalFileSystem
> > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> > > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > > > ... 1 more
> > > > Exception in thread "main"
> > > >
> > > >
> > > > Can someone tell me how to resolve this?
> > > >
> > > > Thanks,
> > > > Venkat.
> > > >
> > >
> >
>

Re: ClassNotFoundException while running pig in local mode

Posted by Praveen R <pr...@sigmoidanalytics.com>.
I usually have hadoop configured on the system even when using pig in local
mode and don't remember running pig without hadoop.

It could be working on versions pig-13 or prior since it used to ship all
hadoop jars along with the release, but with pig-14 hadoop jars are no
longer shipped (believe this is to have a lighter packaging).

Regards,
Praveen

On Fri, Dec 26, 2014 at 2:36 PM, Venkat Ramakrishnan <
venkat.architect@gmail.com> wrote:

> Thanks Praveen. Is Hadoop required for running pig local ?
> I read in a couple of places on the web saying that hadoop
> is not required for local mode...
>
> - Venkat.
>
> On Fri, Dec 26, 2014 at 1:44 PM, Praveen R <pr...@sigmoidanalytics.com>
> wrote:
>
> > Looks like pig isn't able to find the hadoop jars. Could you try putting
> > hadoop on the system i.e. have hadoop command in the environment path.
> >
> > Regards,
> > Praveen
> >
> > On Thu, Dec 25, 2014 at 4:17 PM, Venkat Ramakrishnan <
> > venkat.architect@gmail.com> wrote:
> >
> > > Hi all,
> > >
> > > I am getting the following error while running pig in local mode (pig
> -X
> > > local) :
> > >
> > > The system cannot find the path specified.
> > > java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> > > at org.apache.pig.Main.<clinit>(Main.java:106)
> > > Caused by: java.lang.ClassNotFoundException:
> > > org.apache.commons.logging.LogFactory
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > > ... 1 more
> > > Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
> > > org/apache/hadoop/fs/LocalFileSystem
> > > at org.apache.pig.Main$1.run(Main.java:101)
> > > Caused by: java.lang.ClassNotFoundException:
> > > org.apache.hadoop.fs.LocalFileSystem
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > > ... 1 more
> > > Exception in thread "main"
> > >
> > >
> > > Can someone tell me how to resolve this?
> > >
> > > Thanks,
> > > Venkat.
> > >
> >
>

Re: ClassNotFoundException while running pig in local mode

Posted by Venkat Ramakrishnan <ve...@gmail.com>.
Thanks Praveen. Is Hadoop required for running pig local ?
I read in a couple of places on the web saying that hadoop
is not required for local mode...

- Venkat.

On Fri, Dec 26, 2014 at 1:44 PM, Praveen R <pr...@sigmoidanalytics.com>
wrote:

> Looks like pig isn't able to find the hadoop jars. Could you try putting
> hadoop on the system i.e. have hadoop command in the environment path.
>
> Regards,
> Praveen
>
> On Thu, Dec 25, 2014 at 4:17 PM, Venkat Ramakrishnan <
> venkat.architect@gmail.com> wrote:
>
> > Hi all,
> >
> > I am getting the following error while running pig in local mode (pig -X
> > local) :
> >
> > The system cannot find the path specified.
> > java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> > at org.apache.pig.Main.<clinit>(Main.java:106)
> > Caused by: java.lang.ClassNotFoundException:
> > org.apache.commons.logging.LogFactory
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > ... 1 more
> > Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
> > org/apache/hadoop/fs/LocalFileSystem
> > at org.apache.pig.Main$1.run(Main.java:101)
> > Caused by: java.lang.ClassNotFoundException:
> > org.apache.hadoop.fs.LocalFileSystem
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > ... 1 more
> > Exception in thread "main"
> >
> >
> > Can someone tell me how to resolve this?
> >
> > Thanks,
> > Venkat.
> >
>

Re: ClassNotFoundException while running pig in local mode

Posted by Praveen R <pr...@sigmoidanalytics.com>.
Looks like pig isn't able to find the hadoop jars. Could you try putting
hadoop on the system i.e. have hadoop command in the environment path.

Regards,
Praveen

On Thu, Dec 25, 2014 at 4:17 PM, Venkat Ramakrishnan <
venkat.architect@gmail.com> wrote:

> Hi all,
>
> I am getting the following error while running pig in local mode (pig -X
> local) :
>
> The system cannot find the path specified.
> java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
> at org.apache.pig.Main.<clinit>(Main.java:106)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.logging.LogFactory
> at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 1 more
> Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
> org/apache/hadoop/fs/LocalFileSystem
> at org.apache.pig.Main$1.run(Main.java:101)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.hadoop.fs.LocalFileSystem
> at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 1 more
> Exception in thread "main"
>
>
> Can someone tell me how to resolve this?
>
> Thanks,
> Venkat.
>