Oracle thin driver not loading

Hello all,

Part time Java programmer.  Pretty new to apache camel and spring. Been using Intellij for years but I only get to code Java maybe a few hundred hours a year.

My env

  • intellij 14.1.3 on Mac OS X Yosemite
  • apache camel command line application
  • uses spring framework for route specifications
  • maven project
    • all libraries loaded via maven
    • no ./lib jar files

I have a route that inserts data into an oracle table

The application works from Intellij no problem. Inserted  4,000+ records last night from intellij

When I build the artifact and run as a jar file from the command line I get

No suitable driver found for jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)
( = dedicated) (

So I tried to preload the driver with

try {
Class c   = Class.forName("oracle.jdbc.OracleDriver");"success: Class.forName(\"oracle.jdbc.OracleDriver\")");
} catch (ClassNotFoundException e) {"Unable to load ojdbc");;

I get

[ main] MyMain INFO  Unable to load ojdbc
[ main] MyMain INFO  java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver

When I untar the jar file and search for "ojdb"

find ./ | grep ojdbc
find ./ | grep oracle
# only finds my packages with oracle in the name

If I grep for some other library I see the class files and more

find ./ | grep log4j
many lines removed for breviety

Any idea how I can fix this?

1 comment
Comment actions Permalink

I got this working. I just recreated the artifact definition.


Please sign in to leave a comment.