Member since
07-02-2017
2
Posts
0
Kudos Received
0
Solutions
07-03-2017
06:47 AM
thank you for your help. I installed sqoop client by using AMBARI-SERVER. I am able to run all Sqoop commands normally without any issue and I installed the sqoop again as you suggested. But still no luck..
... View more
07-02-2017
10:10 PM
Hi.. I am also facing similar kind of problem when I am trying to use sqoop job --create function and below is the command and error I am facing. [hdfs@master root]$ sqoop job --create shortcut -- import --connect jdbc:mysql://master.cluster.com:3306/hadoop_example?zeroDateTimeBehavior=convertToNull --username root --table school --driver com.mysql.jdbc.Driver --incremental append --last-value '2017-05-29 02:02:51.0' --check-column timestamp -m 1 Warning: /usr/hdp/2.5.0.0-1245/hbase does not exist! HBase imports will fail. Please set $HBASE_HOME to the root of your HBase installation. Warning: /usr/hdp/2.5.0.0-1245//sqoop/../hcatalog does not exist! HCatalog jobs will fail. Please set $HCAT_HOME to the root of your HCatalog installation. Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail. Please set $ACCUMULO_HOME to the root of your Accumulo installation. 17/07/03 00:17:10 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.5.0.0-1245 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:759) at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.createInternal(HsqldbJobStorage.java:399) at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.create(HsqldbJobStorage.java:379) at org.apache.sqoop.tool.JobTool.createJob(JobTool.java:181) at org.apache.sqoop.tool.JobTool.run(JobTool.java:294) at org.apache.sqoop.Sqoop.run(Sqoop.java:147) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:225) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234) at org.apache.sqoop.Sqoop.main(Sqoop.java:243) 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) ... 12 more I tried to follow your suggestion to download the java-json.jar file and placed it /usr/lib/sqoop/lib/java-json.jar.(in my system only /usr/lib is avaliable. I manually created 2 folder /sqoop/lib.) Please let me know if you can help me.
... View more