Support Questions

Find answers, ask questions, and share your expertise

Sqoop Import Issue (driver)

avatar
Explorer

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?

3 REPLIES 3

avatar
Explorer

Update:

 

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

 

avatar
Rising Star

 

maybe 

 --driver org.postgresql.Driver

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

 

avatar
Champion

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 '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/