Reply
New Contributor
Posts: 2
Registered: ‎10-10-2017

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

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

Cloudera Employee
Posts: 211
Registered: ‎03-23-2015

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

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?
New Contributor
Posts: 2
Registered: ‎10-10-2017

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

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.

Highlighted
Posts: 1,565
Kudos: 287
Solutions: 239
Registered: ‎07-31-2013

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

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_...
Backline Customer Operations Engineer
Announcements