Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Highlighted

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

New Contributor

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
Highlighted

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

@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

 


 


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

Highlighted

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

New Contributor

@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

Highlighted

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

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 

 


 


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

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

New Contributor

@stevenmatison 

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

Don't have an account?
Coming from Hortonworks? Activate your account here