- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.OracleDriver
- Labels:
-
Apache Hadoop
-
Apache Hive
-
Apache Sqoop
-
HDFS
Created on ‎09-20-2014 01:39 PM - edited ‎09-16-2022 02:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am testing loading oracle tables into hdfs/hadoop/hive with the following command
sqoop import --connect jdbc:oracle:thin:@<host>:<port>/<db>--username <user name> -P --table <TABLE>
i have copied ojdbc5.jar and ojdbc6.jar files in /usr/lib/sqoop/lib/ on the node from where I am running SQOOP.
I am getting the following error
java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.OracleDriver
I also tried
export SQOOP_CLASSPATH=/usr/lib/sqoop/lib/*
any ideas...?
thanks
Created ‎09-21-2014 11:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
all,
I found a solution and here it is
If parcels are used then copy oracle jdbc driver to /opt/cloudera/parcels/CDH/lib/sqoop/lib
Copying ojdbc5.jar to /opt/cloudera/parcels/CDH/lib/sqoop/lib resolved my issue
Thanks,
Prakash
Created ‎09-20-2014 03:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What java version are you running? ojdbc5.jar should be for JDK 1.5 and ojdbc6.jar should be for JDK 1.6. Choose the jar appropriately.
If the above doesn't work, you should be able to add a "--verbose" flag after "import" in the command you've provided to see the classpaths being used.
Created ‎09-21-2014 11:46 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
all,
I found a solution and here it is
If parcels are used then copy oracle jdbc driver to /opt/cloudera/parcels/CDH/lib/sqoop/lib
Copying ojdbc5.jar to /opt/cloudera/parcels/CDH/lib/sqoop/lib resolved my issue
Thanks,
Prakash
