欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

[sqoop1 error] Got exception running Sqoop java.lang.NullPointerException at org 博客分类: linuxhadoophivesqoop  

程序员文章站 2024-03-15 10:13:47
...

[sqoop1 error] Got exception running Sqoop java.lang.NullPointerException at org

 

问题:

[zkkafka@yanfabu2-35 tmp]$ sqoop job --create sqoop_job_device -- import --connect jdbc:mysql://10.156.50.36:3306/mqh \
> --username root \
> --password root  \
> --query "select deviceid ,appid,register_time from device where \$CONDITIONS" \
> --hive-import \
> --hive-database test \
> --hive-table device \
> --split-by deviceid \
> --fields-terminated-by '\01' \
> --lines-terminated-by '\t' \
> --target-dir /home/zkkafka/hive/tmp/device \
> --hive-delims-replacement ' ' \
> --incremental append \
> --check-column deviceid \
> --last-value 6; 
Warning: /home/zkkafka/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /home/zkkafka/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
19/05/29 14:52:46 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
19/05/29 14:52:46 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
19/05/29 14:52:46 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
java.lang.NullPointerException
	at org.json.JSONObject.<init>(JSONObject.java:144)
	at org.apache.sqoop.util.SqoopJsonUtil.getJsonStringforMap(SqoopJsonUtil.java:43)
	at org.apache.sqoop.SqoopOptions.writeProperties(SqoopOptions.java:785)
	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:70)
	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243)
	at org.apache.sqoop.Sqoop.main(Sqoop.java:252)

 

解决方法:

解决方法:
export  HCAT_HOME=/home/zkkafka/hive/tmp/HiveJobsLog
下载java-json.jar,java-json-schema.jar包:
http://www.java2s.com/Code/Jar/j/Downloadjavajsonjar.htm
scp java-json.jar  zkkafka@10.156.50.37:/home/zkkafka/sqoop/lib/
http://www.java2s.com/Code/Jar/j/Downloadjavajsonschemajar.htm
 scp java-json-schema.jar zkkafka@10.156.50.36:/home/zkkafka/sqoop/lib/

 scp json-20160212.jar zkkafka@10.156.50.37:/home/zkkafka/sqoop/lib/

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

捐助开发者 

在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(支持支付宝和微信 以及扣扣群),没钱捧个人场,谢谢各位。

 

个人主页http://knight-black-bob.iteye.com/


[sqoop1 error] Got exception running Sqoop java.lang.NullPointerException at org
            
    
    博客分类: linuxhadoophivesqoop  [sqoop1 error] Got exception running Sqoop java.lang.NullPointerException at org
            
    
    博客分类: linuxhadoophivesqoop  [sqoop1 error] Got exception running Sqoop java.lang.NullPointerException at org
            
    
    博客分类: linuxhadoophivesqoop  
 
 
 谢谢您的赞助,我会做的更好!