You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Divya Gehlot <di...@gmail.com> on 2015/07/21 11:14:36 UTC

run pig script through eclipse without hadoop

Hi,
Sorry for such a basic question but I am breaking my head to sort it out .
I am trying to run pig script through eclipse without hadoop on windows .
I am using Pigserver to run pig script .
but I am facing build path issues.

I added pig.jar
<http://www.filedropper.com/showdownload.php/pig-0140-snapshot> in my build
path but I am getting error when I run my pig script through PigServer
like
 PigServer pig = new PigServer(ExecType.LOCAL);
        pig.registerScript("C:/path /to/pig/scripts/JustString.pig");



Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
> at org.apache.pig.impl.util.PropertiesUtil.<clinit>(PropertiesUtil.java:34)
> at org.apache.pig.PigServer.<init>(PigServer.java:202)
> at com.paypal.debugpig.DebugPig.main(DebugPig.java:13)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.commons.logging.LogFactory
> at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> ... 3 more



If any body could point me out what dependencies do I need to add to build
path, from  where I am Running Pigserver other than pig.jar to make it work
.
Will appreciate your help.

Thanks,
Regards,
Divya

Re: run pig script through eclipse without hadoop

Posted by Divya Gehlot <di...@gmail.com>.
Can u please give me  required jar files list because if I include all the
jar files from pig lib and run pig server from eclipse I get some
permission issues on something like  tmp/hadoop-username/.../.staging to
770 . I want to run pig in local mode without hadoop to test my pig scripts
before running on cluster .

Re: run pig script through eclipse without hadoop

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

This is because of some jars missing in the classpath. Please add missing
jars like log4j, commons-logging-1.1.1.jar and others if necessary.

Thanks
Nagamallikarjuna

On Tue, Jul 21, 2015 at 2:44 PM, Divya Gehlot <di...@gmail.com>
wrote:

> Hi,
> Sorry for such a basic question but I am breaking my head to sort it out .
> I am trying to run pig script through eclipse without hadoop on windows .
> I am using Pigserver to run pig script .
> but I am facing build path issues.
>
> I added pig.jar
> <http://www.filedropper.com/showdownload.php/pig-0140-snapshot> in my
> build
> path but I am getting error when I run my pig script through PigServer
> like
>  PigServer pig = new PigServer(ExecType.LOCAL);
>         pig.registerScript("C:/path /to/pig/scripts/JustString.pig");
>
>
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> > org/apache/commons/logging/LogFactory
> > at
> org.apache.pig.impl.util.PropertiesUtil.<clinit>(PropertiesUtil.java:34)
> > at org.apache.pig.PigServer.<init>(PigServer.java:202)
> > at com.paypal.debugpig.DebugPig.main(DebugPig.java:13)
> > Caused by: java.lang.ClassNotFoundException:
> > org.apache.commons.logging.LogFactory
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> > ... 3 more
>
>
>
> If any body could point me out what dependencies do I need to add to build
> path, from  where I am Running Pigserver other than pig.jar to make it work
> .
> Will appreciate your help.
>
> Thanks,
> Regards,
> Divya
>



-- 
Thanks and Regards
Nagamallikarjuna