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.

Oozie fails with Could not load db driver class: oracle.jdbc.OracleDriver

Oozie fails with Could not load db driver class: oracle.jdbc.OracleDriver

New Contributor

I am getting below error while executing sqoop export command(in shell script) with oozie.

"java.lang.RuntimeException: Could not load db driver class: oracle.jdbc.OracleDriver"

sqoop export from cli(edge node) works fine.

I have added the ojdbc6.jar to below locations. /opt/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/lib/sqoop/lib/

(HDFS locations) /user/oozie/share/lib/sqoop/ and /user/oozie/share/lib/lib_20161215195933/sqoop

i have also set oozie.use.system.libpath=true in my oozie job.properties file

Please guide me if i am missing any setting. 

 

error1.png

3 REPLIES 3

Re: Oozie fails with Could not load db driver class: oracle.jdbc.OracleDriver

Guru
In the Oozie launcher log, can you find that ojdbc6.jar was loaded by the launcher? Are you sure that /user/oozie/share/lib/lib_20161215195933 is the correct location for the current share lib path?

Have you also tried to put ojdbc6.jar file under workflow's own "lib" directory in HDFS?

Re: Oozie fails with Could not load db driver class: oracle.jdbc.OracleDriver

New Contributor

Hi

when i do share lib update it shows me below path and also when i get the shareliblist i can see the added jar file.

 

sharelib.PNG

I will try with the lib folder where workflow.xml file is present.

Re: Oozie fails with Could not load db driver class: oracle.jdbc.OracleDriver

Master Guru
Adding it to the sqoop/ sub-dir of the ShareLib will make certain that the jar is available for all sqoop actions. Your action however is the shell one (why not sqoop?) and therefore the jar will not make it there unless you explicitly ask the action to include both shell and sqoop required jars: http://archive.cloudera.com/cdh5/cdh/5/oozie/WorkflowFunctionalSpec.html#a17.1_Action_Share_Library_...