猿问

c3p0连接池问题求大神弄了一个下午一个晚上啦

九月 14, 2016 9:33:10 下午 com.mchange.v2.resourcepool.BasicResourcePool 

警告: com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@4a9985f7 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 

java.lang.NullPointerException

at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:524)

at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:493)

at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)

at java.sql.DriverManager.getDriver(DriverManager.java:262)

at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:285)

at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:161)

at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:161)

at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:147)

at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:202)

at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)

at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)

at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)

at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)

at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

九月 14, 2016 9:33:10 下午 com.mchange.v2.resourcepool.BasicResourcePool 





用网页doGet或者doPost方法 会出现以上错误,但是如果用@Test却不会出现任何错误,求大神

九天哟
浏览 4752回答 1
1回答

大咪

空指针异常……
随时随地看视频慕课网APP

相关分类

Java
我要回答