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

警告: [email protected]72 -- 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
警告: [email protected]c -- 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地址

传送门

http://pan.baidu.com/s/1qYpqDVQ

时间: 2024-12-17 15:10:53

java.sql.SQLException: Connections could not be acquired from the underlying database!的相关文章

Connections could not be acquired from the underlying database

从基础数据库,无法获取连接,无法连接到数据库. 严重: StandardWrapper.Throwable org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connections could not be acquired from

spring整合mybaits时Connections could not be acquired from the underlying database!异常解决

<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/sch

Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connectio

严重: StandardWrapper.Throwableorg.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!

java.sql.SQLException: The server time zone value &#39;???&#250;&#177;&#234;&#215;??&#177;??&#39; is unrecognized or represents more

2018年08月15日 21:17:31 Going_cc 阅读数:34297 最近很多次遇到 The server time zone value '?D1ú±ê×?ê±??' is unrecognized or represents more than one time zone这个问题, 报错为: org.springframework.web.util.NestedServletException: Request processing failed; nested exception

tomcat dbcp 基于jndi配置时出现java.sql.SQLException: Already closed

最近观察生产环境发现一个现象,一段时间不操作,再重新操作时,数据库连接第一次会出现:java.sql.SQLException: Already closed.,如下: 数据源是用tomcat dbcp 基于jndi配置管理的,查了下,如下: 原因: You're probably running into the fact that MYSQL closes connections  which have been open "too long". Probably if you m

java.sql.SQLException:ORA-24778:无法打开连接

weblogic日志中报:java.sql.SQLException:ORA-24778:无法打开连接.分析功能是有多次对远程表的操作,先查看关于db_link的参数: SQL> show parameter open_links NAME                                 TYPE        VALUE ------------------------------------ ----------- ------- open_links            

java sql SQLException Access denied for user &#39;sa&#39; &#39;localhos

1.错误描述 ERROR:2015-05-01 23:43:04[localhost-startStop-1] - HHH000319: Could not get database metadata java.sql.SQLException: Access denied for user 'sa'@'localhost' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)

java.sql.SQLException: Access denied for user &#39;root&#39;@&#39;d001&#39; (using password: YES)

在安装CDH的时候报错了: [email protected]:/var/cache/yum/x86_64/7/base# /opt/cm-5.13.0/share/cmf/schema/scm_prepare_database.sh mysql cdh -hd001 -uroot -proot -pwordemotion --scm-host d001 root root --force JAVA_HOME=/soft/jdk1.8.0_144 Verifying that we can wr

错误:java.sql.SQLException: Access denied for user &#39;&#39;@&#39;localhost&#39; (using password: NO)

详细错误: 1 java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO) 2 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.17.jar:8.0.17] 3 at com.mysql.cj.jdbc.exceptions.SQL