1 Reply Latest reply on May 16, 2014 2:16 AM by Freeman(Yue) Fang

    Deployment issue with c3p0 in hibernate/JPA, spring application.

    hemant sharma Newbie

      Hi, i am trying to deploy an application into Redhat jboss fuse 6.1 server that uses hibernate with JPA, spring. But, i keep getting below error:


      com.springsource.com.mchange.v2.c3p0 - 0.9.1.2 | Could not load driverClass com.microsoft.sqlserver.jdbc.SQLServerDriver
      java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver not found by com.springsource.com.mchange.v2.c3p0 [70]
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
        at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_45]
        at java.lang.Class.forName0(Native Method)[:1.7.0_45]
        at java.lang.Class.forName(Class.java:190)[:1.7.0_45]
        at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:100)[70:com.springsource.com.mchange.v2.c3p0:0.9.1.2]
        at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:132)[70:com.springsource.com.mchange.v2.c3p0:0.9.1.2]
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)[70:com.springsource.com.mchange.v2.c3p0:0.9.1.2]
        at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)[70:com.springsource.com.mchange.v2.c3p0:0.9

       

      Here's my config file:

      <bean id="myDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">

           <property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />

           <property name="jdbcUrl" value="jdbc:sqlserver://db01:1433;databaseName=MY_DB" />

           <property name="user" value="dbuser" /> <property name="password" value="appuser" />

           <property name="maxPoolSize" value="100"/> <property name="minPoolSize" value="25"/>

      </bean>

      It works fine in my Fuse IDE, but throws error when i try to deploy it in redhat  jboss fuse fabric container. I have provided all required jars as bundles. Any guidance please........