Skip to main content
awhitter
Gold ⭐️
Feb 8, 2017 6:18 PM UTC

Running oozie sqoop action fails with "Launcher exception: org/json/JSONObject"

  • Oct 5, 2026 9:23 AM UTC
  • 1 reply
  • 2529 views
  • Translate All

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>

1 reply

PentaReddy
Gold ⭐️
May 17, 2017 1:22 PM UTC

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.

Translate