Hi Guys,
I was using DBCP in my application which is using spring+hibernate+strust2.
I want to upgrade it to c3p0 connection pooling so i made changes as:
Quote:
<bean id="dataSource" class = "com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="${db.driverClassName}" />
<property name="jdbcUrl" value="${db.url}" />
<property name="user" value="${db.username}" />
<property name="password" value="${db.password}" />
<!-- configuration pool via c3p0 -->
<property name="initialPoolSize" value="3"/>
<property name="minPoolSize" value="3"/>
<property name="maxPoolSize" value="50"/>
<property name="idleConnectionTestPeriod" value="300"/>
<property name="acquireIncrement" value="1"/>
<property name="maxStatements" value="50"/>
<property name="numHelperThreads" value="3"/>
</bean>
Here is my jdbc url and driver class :
Quote:
db.driverClassName=oracle.jdbc.driver.OracleDriver
db.url = jdbc:Oracle:thin:@10.184.55.118:1521:xe
I am facing error as:
Quote:
[FundamoUtility]C3P0PooledConnectionPoolManager[identityToken->1bqoo2u8rcmnofi8391cz|bf7916]-HelperThread-#2 19:15:50,076 DEBUG BasicResourcePool:1886 - An exception occurred while acquiring a poolable resource. Will retry.
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(Unknown Source)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:228)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:183)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:172)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:188)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1074)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1061)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1798)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:636)
Things I already tried:
1)Move the ojdbc.jar from the webapp lib folder to the tomcat lib folder
2)Checked jdbc url
3) given hard coded values for connection
But all fails.
I am using Oracle XE database and using ojdbc14.jar for connection with oracle.
Can you please help me how do i resolve this issue ??
Thanks in Advance,
vishal