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

Sqoop Import Issue (driver)

Sqoop Import Issue (driver)


I'm working on pulling a table in from a Postgres database, but am running into an error:


ERROR manager.SqlManager: Error executing statement: java.sql.SQLException: No suitable driver found for jdbc:postgresql://xx.xx.xx.xx:5432


I've downloaded the postgresql-9.0-801.jdbc4.jar file and placed it in /var/lib/sqoop2/ of the node and restarted the Sqoop service, yet I still get the error above. Any ideas what I'm doing incorrectly?


Re: Sqoop Import Issue (driver)




I've manually added the --driver postgresql1-9.4.1208.jre6.jar to my import command to manually point to the driver - but I still get an error stating it could not load the driver...


ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: postgresql1-9.4.1208.jre6.jar


Re: Sqoop Import Issue (driver)




 --driver org.postgresql.Driver

given what you see in  jar tf postgresql-9.4.1212.jre7.jar



Re: Sqoop Import Issue (driver)


1. Check on the user perimission of the jar file.

 2.when you add driver manully do this  --driver = org.postgresql.Driver 

3. Please try the below jdbc driver version. 


Optionally you can extract the jar file see the if there is    org.postgresql.Driver.class 


curl -L '' -o postgresql-9.2-1002.jdbc4.jar
$ sudo cp postgresql-9.2-1002.jdbc4.jar /var/lib/sqoop/


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