• java.sql.SQLException: Connections could not be acquired from the underlying database!


    警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@2b121272 -- 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).
    java.sql.SQLException: Connections could not be acquired from the underlying database!
    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:104)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:236)
    at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:94)
    at com.mchange.v2.c3p0.ComboPooledDataSource.getConnection(ComboPooledDataSource.java:521)
    at org.apache.commons.dbutils.QueryRunner.prepareConnection(QueryRunner.java:337)
    at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:652)
    at com.imooc.dao.impl.UserDaoImpl.regist(UserDaoImpl.java:27)
    at com.imooc.service.impl.UserServiceImpl.regist(UserServiceImpl.java:19)
    at com.imooc.servlet.RegistServlet.doGet(RegistServlet.java:43)
    at com.imooc.servlet.RegistServlet.doPost(RegistServlet.java:55)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
    at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:970)
    at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:208)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:232)
    ... 31 more
    三月 18, 2017 10:17:38 下午 com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask run
    警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@da7c95c -- 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).

    个人解决方案:

         换其他版本的C3P0  jar包

    c3p0-0.9.1.2.jar地址

    传送门    

    https://pan.baidu.com/s/1UypLTa69w5sx5vmcb0XU-A

         

  • 相关阅读:
    梦想就是梦想,不要让它成为杯具
    程序员,离开了库你还能干什么?
    采用WPF框架编写的3D软渲染Demo
    what the hell with Gimbal Lock?
    FX Composer VS RenderMonkey 使用对比之 FX Composer篇
    为什么你应该使用OpenGL而不是DirectX?
    游戏中的夜视效果实现
    {转}深入浅出之正则表达式(一)
    正则表达式30分钟入门教程版本:v2.31 (2009411) 作者:deerchao 转载请注明来源
    2013年
  • 原文地址:https://www.cnblogs.com/bigorang/p/6576465.html
Copyright © 2020-2023  润新知