7 Replies Latest reply on Jan 10, 2012 9:30 AM by Freeman(Yue) Fang

    Cannot load oracle jdbc driver

    Ed Loyot Newbie

      Hi Folks,


      I'm trying to run a simple example that uses Camel, Hibernate in an OSGi bundle using SMX 4.4.


      When the example route is executed SMX complains that it can't load the jdbc driver I am using:


      Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'

      java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver not found from bundle ...


      I tried to force this class to be included in my bundle by using the <Export-Package> tab but the bundler plugin gives me a warning that this is an unnecessary instruction and does not load the class. I think this is because the class in not used in the code only in the JDBC connection configuration.


      I also tried using <Embed-Dependency> to include the oracle jar file but this leaves some required dependency out and the bundle won't start. I've attached my config file and pom.