为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

九天哟 2016-09-14 21:38:13
九月 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却不会出现任何错误,求大神
查看完整描述

1 回答

已采纳
?
大咪

TA贡献785条经验 获得超332个赞

空指针异常……

查看完整回答
反对 回复 2016-09-14
  • 九天哟
    九天哟
    恩知道是空指针异常问题是怎么解决T T
  • 大咪
    大咪
    你是用什么方式配的连接池呀。是是交给Spring了还是方式……?把配置文件xml发上来看看
  • 1 回答
  • 0 关注
  • 4732 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信