Thanks Rohini appreciate your response. Thanks Pankaj
On 10/28/12 1:05 PM, "Rohini Palaniswamy" <[email protected]> wrote: >Hi Pankaj, > Pig depends on jline-0.9.94.jar and is packaged as part of >pig-withouthadoop.jar or pig.jar when you build pig and will be part of an >installation of pig. But the pig jar in maven does not include jline. >Please add jline (http://repo1.maven.org/maven2/jline/jline/0.9.94/) to >your maven assembly configuration to package it as part of your executable >jar. > >Regards, >Rohini > >On Fri, Oct 26, 2012 at 2:38 PM, Pankaj Andhale ><[email protected]>wrote: > >> I have a test.pig script that I am executing from my java application >> >> public static void main(String[] args) { >> try { >> PigServer pigServer = new PigServer("local"); >> runIdQuery(pigServer, "passwd"); >> >> >> } >> catch(Exception e) { >> } >> } >> public static void runIdQuery(PigServer pigServer, String >> inputFile) throws IOException { >> pigServer.setBatchOn(); >> pigServer.debugOn(); >> pigServer.registerScript("src/main/resources/test.pig"); >> pigServer.executeBatch(); >> pigServer.shutdown(); >> } >> >> >> *I am using maven to build my project and create a executable jar with >> dependencies. >> After creating the executable jar with dependencies when I try to >>execute >> it i am getting the following error * >> >> 12/10/26 14:26:05 INFO executionengine.HExecutionEngine: Connecting to >> hadoop file system at: file:/// >> 12/10/26 14:26:05 WARN conf.Configuration: fs.default.name is >>deprecated. >> Instead, use fs.defaultFS >> 2012-10-26 14:26:05.770 java[42561:1903] Unable to load realm mapping >>info >> from SCDynamicStore >> 2012-10-26 14:26:05.825 java[42561:1903] Unable to load realm mapping >>info >> from SCDynamicStore >> 12/10/26 14:26:05 WARN conf.Configuration: fs.default.name is >>deprecated. >> Instead, use fs.defaultFS >> *Exception in thread "main" java.lang.NoClassDefFoundError: >> jline/ConsoleReaderInputStream* >> at org.apache.pig.PigServer.registerScript(PigServer.java:655) >> at org.apache.pig.PigServer.registerScript(PigServer.java:760) >> at org.apache.pig.PigServer.registerScript(PigServer.java:723) >> at com.intuit.pandhale.LastGoodKey.runIdQuery(LastGoodKey.java:40) >> at com.intuit.pandhale.LastGoodKey.main(LastGoodKey.java:30) >> *Caused by: java.lang.ClassNotFoundException: >> jline.ConsoleReaderInputStream >> * >> 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:306) >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) >> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) >> ... 5 more >> >> >> >> I have double checked that my Java code is not using >> jline.ConsoleReaderInputStream >> >> I want to deploy this application on aws and use the AWS elastic map >>reduce >> service. >> >> When I was executing the same java application using the pig.jar built >>by >> homebrew it worked perfectly fine. >> >> Can anybody suggest a resolution to my problem. >> >> Pig version 0.9.1 >> Hadoop core version 1.0.3 >> maven 3.0.3 >> IDE used is eclipse Indigo >> >> >> Thanks >> Pk >>
