Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sqoop - Could not find or load main class org.apache.sqoop.Sqoop

I installed Hadoop, Hive, HBase, Sqoop and added them to the PATH.

When I try to execute sqoop command, I'm getting this error:

Error: Could not find or load main class org.apache.sqoop.Sqoop

Development Environment:

OS : Ubuntu 12.04 64-bit

Hadoop Version: 1.0.4

Hive Version: 0.9.0

Hbase Version: 0.94.5

Sqoop Version: 1.4.3

like image 603
talha06 Avatar asked Mar 20 '13 20:03

talha06


3 Answers

make sure you have sqoop-1.4.3.jar under your SQOOP HOME directory.

Note : May be because you had downloaded wrong distribution under Sqoop Distribution

like image 109
Laxmikanth Samudrala Avatar answered Nov 09 '22 12:11

Laxmikanth Samudrala


I have resolved this issue on CentOS 6.3.
I have Hadoop-1.0.4, hbase-0.94.6, hive-0.10.0, pig-0.11.1, sqoop-1.4.3.bin__hadoop-1.0.0, zookeeper-3.4.5 installed.

I was also running same problem at sqoop: Error - Could not find the main class: org.apache.sqoop.Sqoop.

To resolve this issue I have copied the jar file: sqoop-1.4.3.jar from $SQOOP_HOME/ into the $HADOOP_HOME/lib/.

Hope this would help someone who struggling sqoop to be work with hadoop.

like image 31
user2250033 Avatar answered Nov 09 '22 13:11

user2250033


Unfortunately, I didn't find a complete answer for my problems. Current sqoop installation version I used was 1.4.6 . I am not sure about sqoop-1.4.6.tar.gz if one has to compile the source code, I was able to beat the same error Error - Could not find the main class: org.apache.sqoop.Sqoop using following instructions:

Instead I downloaded sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz from apache sqoop and installed it at /home/ubuntu/SQOOP/ renamed sqoop-1.4.6.bin__hadoop-2.0.4-alpha to sqoop. I wanted to use with Yarn.

Then export and set $SQOOP_HOME I used this

export SQOOP_HOME=/home/ubuntu/SQOOP/sqoop/

export PATH=$PATH:$SQOOP_HOME/bin

Now if one go to $SQOOP_HOME/bin and try

./sqoop help

It should work without any issue.

like image 3
Somum Avatar answered Nov 09 '22 11:11

Somum