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.

Sqoop giving error: "Could not load db driver class: oracle.jdbc.OracleDriver"

Sqoop giving error: "Could not load db driver class: oracle.jdbc.OracleDriver"

New Contributor

I have completed the installation of CDH 5.16.1 on Ubuntu 16.04 LTS with OpenJDK 8. I am now in the process of testing the different components to ensure each works as predicted.

 

In my attempt to test Sqoop using the Cloudera Hadoop Tutorial, I ran the following command: 

 

sqoop import-all-tables \
    -m {{cluster_data.worker_node_hostname.length}} \
    --connect jdbc:mysql://{{cluster_data.manager_node_hostname}}:3306/retail_db \
    --username=retail_dba \
    --password=cloudera \
    --compression-codec=snappy \
    --as-parquetfile \
    --warehouse-dir=/user/hive/warehouse \
    --hive-import

 but received the following error:

 

Could not load db driver class: com.mysql.jdbc.Driver

 

In my search for a solution, I downloaded and placed the mysql conector in the following folders according to the advice given:

 

/var/lib/sqoop

 

/opt/cloudera/parcels/CDH-5.16.1-1.cdh5.16.1.p0.3/lib/sqoop

 

I am still getting the error above. Please help.

1 REPLY 1

Re: Sqoop giving error: "Could not load db driver class: oracle.jdbc.OracleDriver"

Contributor

Im assuming you also changed ownership of the driver to sqoop correct, as well as set permissions of /var/lib/sqoop folder to 755. Can you confirm path of sqoop home?