grunt> register '/home/piyush/Desktop/pro/json-simple-1.1.1.jar'
grunt> register '/home/piyush/Desktop/pro/elephant-bird-pig-4.1.jar'
grunt> register '/home/piyush/Desktop/pro/elephant-bird-hadoop-compat-4.1.jar'
grunt> register '/home/piyush/Desktop/pro/elephant-bird-core-4.1.jar'
grunt> load_tweets = LOAD '/home/piyush/Desktop/pro/quattr.txt' USING com.twitter.elephantbird.pig.load.JsonLoader('-nestedLoad') AS myMap;
2017-01-26 07:16:29,631 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2998: Unhandled internal error. org/slf4j/LoggerFactory
grunt> load1_tweets = LOAD '/home/piyush/Desktop/pro/product.txt' USING com.twitter.elephantbird.pig.load.JsonLoader('-nestedLoad') AS myMap;
2017-01-26 07:17:47,740 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2998: Unhandled internal error. Could not initialize class com.twitter.elephantbird.pig.load.JsonLoader
I registered all required jar files and then load two different json. Both show error 2998
with load1_tweets an additional error that Could not initialize class
as shown above. How to reslove this error.
Getting following error in the logfile:
Pig Stack Trace
---------------
ERROR 2998: Unhandled internal error. org/slf4j/LoggerFactory
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at com.twitter.elephantbird.pig.load.LzoBaseLoadFunc.<clinit>(LzoBaseLoadFunc.java:36)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.pig.impl.PigContext.resolveClassName(PigContext.java:651)
at org.apache.pig.parser.LogicalPlanBuilder.validateFuncSpec(LogicalPlanBuilder.java:1336)
at org.apache.pig.parser.LogicalPlanBuilder.buildFuncSpec(LogicalPlanBuilder.java:1324)
at org.apache.pig.parser.LogicalPlanGenerator.func_clause(LogicalPlanGenerator.java:5184)
at org.apache.pig.parser.LogicalPlanGenerator.load_clause(LogicalPlanGenerator.java:3515)
at org.apache.pig.parser.LogicalPlanGenerator.op_clause(LogicalPlanGenerator.java:1625)
at org.apache.pig.parser.LogicalPlanGenerator.general_statement(LogicalPlanGenerator.java:1102)
at org.apache.pig.parser.LogicalPlanGenerator.statement(LogicalPlanGenerator.java:560)
at org.apache.pig.parser.LogicalPlanGenerator.query(LogicalPlanGenerator.java:421)
at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:191)
at org.apache.pig.PigServer$Graph.validateQuery(PigServer.java:1791)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1764)
at org.apache.pig.PigServer.registerQuery(PigServer.java:707)
at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:1075)
at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:505)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:231)
at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:206)
at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:66)
at org.apache.pig.Main.run(Main.java:564)
at org.apache.pig.Main.main(Main.java:176)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 23 more