Exception:
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: 307)
At sun. misc. Launcher $ AppClassLoader. loadClass (Launcher. java: 301)
At java. lang. ClassLoader. loadClass (ClassLoader. java: 248)
At first glance, I couldn't find the jar package. This problem had plagued me for one day. It was useless to modify the lib by various modifications. The English documents found on the Internet were useless to modify the lib (the version was too new, no Chinese information ). Solution:
Go to $ SQOOP_HOME/bin and modify the sqoop script:
Before modification: exec $ {Hadoop_COMMON_HOME}/bin/hadoop org. apache. sqoop. Sqoop "$ @"
After modification: exec $ {HADOOP_COMMON_HOME}/bin/hadoop jar $ SQOOP_HOME/lib/sqoop-1.4.3-cdh4.5.0.jar org. apache. sqoop. Sqoop "$ @"
It can be seen that, because the hadoop command is used, it is required to install hadoop on the machine where the sqoop-1.4.3-cdh4.5.0 is installed first
Sqoop details: click here
Sqoop: click here
Implement data import between Mysql, Oracle, and HDFS/Hbase through Sqoop
[Hadoop] Detailed description of Sqoop Installation Process
Use Sqoop to export data between MySQL and HDFS Systems
Hadoop Oozie learning notes Oozie does not support Sqoop Problem Solving
Hadoop ecosystem construction (hadoop hive hbase zookeeper oozie Sqoop)
Full history of Hadoop learning-use Sqoop to import MySQL Data to Hive