Sqoop mysql导入Hive 报错Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.shims.ShimLo

sqoop 从mysql导入hive时报如下错误

Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.shims.ShimLoader
	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)
	... 17 more
复制$HIVE_HOME/lib下的hive-shims*的jar包到$SQOOP_HOME/lib下
[wzj@hadoop001 lib]$ cp hive-shims* /home/wzj/app/sqoop/lib
[wzj@hadoop001 sqoop]$ cd lib
[wzj@hadoop001 lib]$ ll hive-shims*
-rw-r--r--. 1 wzj wzj  59686 Dec 26 01:13 hive-shims-0.23-1.1.0-cdh5.16.2.jar
-rw-r--r--. 1 wzj wzj   9034 Dec 26 01:13 hive-shims-1.1.0-cdh5.16.2.jar
-rw-r--r--. 1 wzj wzj 111058 Dec 26 01:13 hive-shims-common-1.1.0-cdh5.16.2.jar
-rw-r--r--. 1 wzj wzj  15431 Dec 26 01:13 hive-shims-scheduler-1.1.0-cdh5.16.2.jar

再次运行命令,数据正常传输!

你可能感兴趣的:(Sqoop)