Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (2)

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>

686 Views
Comments
Rising Star

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.

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎02-08-2017 10:18 AM
Updated by:
 
Contributors
Top Kudoed Authors