Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

java.lang.NoClassDefFoundError: org/json/simple/JSONValue inside map partition when using cloudera

Highlighted

java.lang.NoClassDefFoundError: org/json/simple/JSONValue inside map partition when using cloudera

New Contributor

here is my trace exception message:

 

17/04/09 18:22:22 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
17/04/09 18:22:23 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id
17/04/09 18:22:23 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/jackson/map/JsonMappingException
	at org.apache.hadoop.mapreduce.Job.getJobSubmitter(Job.java:1291)
	at org.apache.hadoop.mapreduce.Job.submit(Job.java:1302)
	at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1325)
	at com.BigData101.WordCount.main(WordCount.java:60)
Caused by: java.lang.ClassNotFoundException: org.codehaus.jackson.map.JsonMappingException
	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)
	... 4 more
1 REPLY 1
Highlighted

Re: java.lang.NoClassDefFoundError: org/json/simple/JSONValue inside map partition when using cloud

New Contributor

after copying  the jar to this location issue got resolved.

 

sudo cp /home/cloudera/Downloads/java-json.jar /opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/

Don't have an account?
Coming from Hortonworks? Activate your account here