Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

problem about java.sql.SQLException: No suitable driver found for jdbc:postgresql

avatar
Explorer

i got error when i try to use sqoop to list all database

the eror say

" java.sql.SQLException: No suitable driver found for jdbc:postgresql "

Please help me I’m new here

4 REPLIES 4

avatar
Super Guru

@CSRabbit 

Installing the PostgreSQL JDBC Driver

Download the PostgreSQL JDBC driver from http://jdbc.postgresql.org/download.html and copy it to the/var/lib/sqoop/ directory. For example:

$ curl -L 'http://jdbc.postgresql.org/download/postgresql-9.2-1002.jdbc4.jar' -o postgresql-9.2-1002.jdbc4.jar
$ sudo cp postgresql-9.2-1002.jdbc4.jar /var/lib/sqoop/

 Snippet from (reference) for cloudera 5.9x but should be similar for other versions, ambari/hdp, or native sqoop.  Just make sure you have the right download url and path for sqoop. 

 

 

If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  

 

Thanks,


Steven @ DFHZ

avatar
Explorer

@stevenmatison 

I already follow the step that you post but still got the same error

Screen Shot 2563-09-16 at 09.26.06.png

avatar
Super Guru

1. Check on the user permission of the jar file you added to your class path. Make sure jar file is in right place.

2. When you add driver manually also add this to sqoop command  --driver = org.postgresql.Driver 

avatar
Explorer

@stevenmatison 

can you explain about how to add a driver in sqoop command, please