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:
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.