3 Replies Latest reply on Nov 9, 2011 5:59 AM by sandy2011

    FUSE ESB CAMEL : exception  Could not load JDBC driver sqljdbc4

    sandy2011

      Hi,

      I am trying to connect to SQL Server using Camel Route.

       

      I placed the sqljdbc4-4.0.jar in the \deploy folder of servicemix.

       

      The jdbc driver fails to load even though it is active in OSGI container.

      -


      133 Active 60 sqljdbc4 (4.0)

      134 Active 60 Spring JDBC (3.0.5.RELEASE)

       

      -


      karaf@root> Exception in thread "SpringOsgiExtenderThread-4" org.springframework.beans.factory.BeanCreationException: Error

      creating bean with name 'testdb' defined in URL bundle://132.0:0/META-INF/spring/camel-context.xml: Error setting proper

      ty values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1)

      are:

      PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClassName' threw exception;

      nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.microsoft.sqlserver.jdbc.SQLSer

      verDriver]

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowir

      eCapableBeanFactory.java:1361)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapabl

      eBeanFactory.java:1086)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapabl

      eBeanFactory.java:517)

      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableB

      eanFactory.java:456)

      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)

      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry

      .java:222)

      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)

      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)

      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBea

      nFactory.java:580)

      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicati

      onContext.java:895)

      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelega

      tedExecutionApplicationContext.java:69)

      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExe

      cutionApplicationContext.java:355)

      at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDe

      legatedExecutionApplicationContext.java:320)

      at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$Compl

      eteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)

      at java.lang.Thread.run(Thread.java:662)

      Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: