Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (2)
avatar

Problem:

Following upgrade to 2.5 Oozie Sqoop job which previously worked now fails with

oozi-W@sqoop-aa6c] Launcher exception: org/json/JSONObject
java.lang.NoClassDefFoundError: org/json/JSONObject
                at org.apache.sqoop.util.SqoopJsonUtil.getJsonStringforMap(SqoopJsonUtil.java:43)
                at org.apache.sqoop.SqoopOptions.writeProperties(SqoopOptions.java:759)
                at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.createInternal(HsqldbJobStorage.java:399)
                at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.create(HsqldbJobStorage.java:379)

Solution:

Ensure that 'java-json.jar' file exists in the following locations: /usr/hdp/current/sqoop-client/lib /usr/hdp/<version>/sqoop/lib

Also copy this jar into HDFS and reference it in your oozie workflow:

e.g.

hdfs dfs -put /usr/hdp/current/sqoop-client/lib/java-json.jar /user/oozie/oozie_scripts/lib/

and change workflow.xml:

<archive>/user/oozie/oozie_scripts/lib/java-json.jar#java-json.jar</archive>

2,525 Views
Comments

Can you eloberate more details as i am facing same issue and when i checked it i see the java-json.jar in the oozie shared lib path, However, i don't see it in the sqoop-client/lib path on the gateway.

Version history
Last update:
‎02-08-2017 10:18 AM
Updated by:
Contributors