You jar must be deployed as a bundle on Karaf. If this jar is not a bundle, then you should use wrap protocol to generate OSGI metadata required toexport/import packages
https://ops4j1.jira.com/wiki/display/paxurl/Wrap+Protocol http://fusesource.com/docs/esb/4.2/deploy_osgi/DeployJar-Wrap.html On Wed, May 7, 2014 at 7:40 AM, Shiv <[email protected]> wrote: > Also, if I remove sqljdbc jar from lib folder, I am getting below > exception. > Seems if the jar is present it is able to pick the class and if it is not > present it fails: > > INFO | jvm 1 | 2014/05/07 11:04:54 | ERROR: > java.lang.RuntimeException: > Failed to execute start task. Reason: > org.springframework.beans.factory.BeanCreationException: Error creating > bean > with name 'testdb' defined in class path resource [app.xml]: Initialization > of bean failed; nested exception is > org.springframework.beans.TypeMismatchException: Failed to convert property > value of type [java.lang.String] to required type [java.lang.Class] for > property 'driverClass'; nested exception is > java.lang.IllegalArgumentException: Cannot find class > [com.microsoft.sqlserver.jdbc.SQLServerDriver] > > I don't get this error when sqljdbc jar is present. > > Thanks > Shiv > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/java-lang-NullPointerException-in-Camel-JDBC-component-for-Select-statement-tp5750783p5750942.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
