hadoop1.2.1上安装sqoop1.4.4出现的问题及解决

问题提示:

[hadoop@namenode conf]$ sqoop
/home/hadoop/sqoop-1.4.4/sqoop-1.4.4.bin__hadoop-1.0.0/conf/sqoop-env.sh: line 29: export: `/home/hadoop/hbase/hbase-0.94.12': not a valid identifier
/home/hadoop/sqoop-1.4.4/sqoop-1.4.4.bin__hadoop-1.0.0/conf/sqoop-env.sh: line 32: export: `/home/hadoop/hive-0.11.0': not a valid identifier
Warning: /usr/lib/hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/lib/hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: $HADOOP_HOME is deprecated.

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/sqoop/Sqoop
Caused by: java.lang.ClassNotFoundException: org.apache.sqoop.Sqoop
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: org.apache.sqoop.Sqoop. Program will exit.

 

解决:

核查了sqoop环境的设置,在网上找了好久,原来原因是在设置好sqoop相关环境之后,需要将sqoop-1.4.4.jar包拷贝到$HADOOP_HOME/lib中。

[hadoop@namenode sqoop-1.4.4.bin__hadoop-1.0.0]$ cp sqoop-1.4.4.jar  /home/hadoop/hadoop/hadoop-1.2.1/lib/

重新运行 sqoop help问题解决。

posted on 2014-03-10 08:56  Peter Jiang  阅读(1117)  评论(0编辑  收藏  举报

导航