On BDA 4.5/CDH 5.7.0 the Sqoop Import Command Fails with "java.lang.ClassNotFoundException: org.json.JSONObject" (Doc ID 2179784.1)

Last updated on SEPTEMBER 06, 2016

Applies to:

Big Data Appliance Integrated Software - Version 4.5.0 and later
Linux x86-64

Symptoms

On BDA 4.5/CDH 5.7.0 a sqoop import command fails as below:


16/09/01 10:13:37 INFO mapreduce.ImportJobBase: Beginning import of *****.*****
Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONObject
  at org.apache.sqoop.util.SqoopJsonUtil.getJsonStringforMap(SqoopJsonUtil.java:42)
  at org.apache.sqoop.SqoopOptions.writeProperties(SqoopOptions.java:742)
  at org.apache.sqoop.mapreduce.JobBase.putSqoopOptionsToConfiguration(JobBase.java:369)
  at org.apache.sqoop.mapreduce.JobBase.createJob(JobBase.java:355)
  at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:249)
  at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:692)
  at org.apache.sqoop.manager.OracleManager.importTable(OracleManager.java:444)
  at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:497)
  at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
  at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
  at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
  at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
  at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
  at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
Caused by: java.lang.ClassNotFoundException: org.json.JSONObject
  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  ... 15 more

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms