Reply
Explorer
Posts: 13
Registered: ‎03-25-2016

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?

Explorer
Posts: 13
Registered: ‎03-25-2016

Re: Sqoop Import Issue (driver)

[ Edited ]

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

 

Contributor
Posts: 32
Registered: ‎11-14-2016

Re: Sqoop Import Issue (driver)

 

maybe 

 --driver org.postgresql.Driver

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

 

Highlighted
Champion
Posts: 768
Registered: ‎05-16-2016

Re: Sqoop Import Issue (driver)

[ Edited ]

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/

 

Announcements
New solutions