Sqoop could not load db driver class

0 votes

I am trying to connect postgres with sqoop

Sqoop version 1.4.6-cdh5.14.2

With command

sqoop list-tables --connect jdbc:postgresql://120.4.99.798:portnumber/db --driver org.postgresql.Driver --connection-manager org.apache.sqoop.manager.GenericJdbcManager --username user --password p

But I am getting

could not load db driver class org.apache.Driver error

But JDBC jar is present in /var/lib/sqoop2

Oct 25, 2019 in Big Data Hadoop by Ritu
• 120 points

edited Oct 26, 2019 by Ritu 2,656 views
The command looks good. Download the driver again and try again. In my case, I was facing this error because the driver was corrupted.

1 answer to this question.

+1 vote
Hello,

Have you tried to put the both versions of the jar in the /var/lib/sqoop2, one with java version in the name and one without ?

I have them like this in my sqoop folder.

Ex:

postgresql-42.1.4.jar

postgresql-42.1.4.jre8.jar

Also check if you are using sqoop2 and not sqoop1.
answered Dec 13, 2019 by Alexandru
• 510 points

Related Questions In Big Data Hadoop

0 votes
3 answers
0 votes
2 answers

Sqoop: Could not load mysql driver exception.

I add mysql driver for sqoop and it ...READ MORE

answered Mar 1, 2020 in Big Data Hadoop by Manh Quang
• 180 points
3,292 views
0 votes
1 answer

Hadoop Mapreduce: Error: Could not find or load main class com.sun.tools.javac.Main

You have to add HADOOP_CLASSPATH environment parameter: expor ...READ MORE

answered Oct 30, 2018 in Big Data Hadoop by Omkar
• 69,210 points
3,192 views
0 votes
1 answer

Hadoop MacOS: formatting namenode: Could not find or load main class

You need to point the HADOOP_PREFIX to ...READ MORE

answered Nov 13, 2018 in Big Data Hadoop by Omkar
• 69,210 points
982 views
0 votes
1 answer

Hadoop: Error: Could not find or load main class org.apache.hadoop.util.VersionInfo

This seems like a path issue. Add the ...READ MORE

answered Nov 16, 2018 in Big Data Hadoop by Omkar
• 69,210 points
11,800 views
0 votes
1 answer

Hadoop: Error: Could not find or load main class com.sun.tools.javac.Main

It looks like the path is not ...READ MORE

answered Nov 30, 2018 in Big Data Hadoop by Omkar
• 69,210 points
4,919 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
10,523 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,166 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
103,822 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
4,234 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP