Connections could not be acquired from the underlying database!
Connections could not be acquired from the underlying database!
报错截图:

报错内容:
Exception in thread "main" java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
at com.courage.pool.c3p0.C3P0Test.main(C3P0Test.java:38)
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.awaitAvailable(BasicResourcePool.java:1469)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)
报错原因:
参考链接:MySQL JDBC Driver 5.1.33 - Time Zone Issue
MySQL JDBC驱动程序的5.1.33后面的版与UTC时区一起使用,必须serverTimezone在连接字符串中显式指定。
解决办法:
在url后面加上时区信息:
jdbc:mysql://localhost:3306/jdbc?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
Connections could not be acquired from the underlying database!的更多相关文章
- 【JDBC 报错】Connections could not be acquired from the underlying database!
项目启动报错: [2016-07-13 10:04:15,074] ERROR org.apache.ibatis.executor.BaseExecutor Could not get a data ...
- JavaWeb:c3p0配置问题-----java.sql.SQLException: Connections could not be acquired from the underlying database!
错误原因 c3p0的配置错误 错误显示 -classpath "D:\Program\Software\IntelliJIDEA\IntelliJ IDEA 2018.2.5\lib\ide ...
- 数据库连接问题之:Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
要么是驱动问题(没加载到工程中去或者其他问题)要么是账号密码或者url或者driver写错 driver:com.mysql.jdbc.Driver url:jdbc:mysql://localhos ...
- c3p0:Connections could not be acquired from the underlying database!解决方案
在利用ssh框架做网站的时候遇到了一个比较棘手的问题,一直连接不上数据库,问题描述如下: 各种百度然后说的最多的解决方案是: 1,驱动配置有误:2,数据库连接地址有误:3,密码或帐号有误: 4,数据库 ...
- dea创建Maven工程用c3p0连接数据库报错java.sql.SQLException: Connections could not be acquired from the underlying
idea java.sql.SQLException: Connections could not be acquired from the underlying database! 转载自:ht ...
- JAVA 问题集中之处以及解决的办法
也许当你看的时候,你可能认为这些都是简单的问题,有什么好记的.其实不是,我认为,我们往往是因为粗心而造成的错误,当你在开发中碰到这些问题时,你能一下看出来是什么错误,达到提高效率.而且往往你把小的问题 ...
- 连接mysql提示com.mchange.v2.resourcepool.BasicResourcePool
1.com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@6ff9129c com.mchange.v2.resourc ...
- spring+hibernate常见异常集合
spring+hibernate出错小结: (1)java.lang.NoClassDefFoundError: org/hibernate/context/CurrentSessionContext ...
- 搭建SSH入过的那些坑
1.添加完相关jar包,写完配置文件,写完测试类,运行提示 WARN:Establishing SSL connection without server's identity verificatio ...
随机推荐
- 初接触matplotlib
1,绘制简单的折线图. 1 import matplotlib.pyplot as plt 2 3 square = [1,4,9,16,25] 4 5 plt.plot(square) 6 plt. ...
- GeoServer安装部署流程
1.双击geoserver-2.13.0.exe进行安装,点击Next进行下一步 2.GeoServer遵循GPL许可,点击I agree继续 3.选择要安装的程序文件目录,点击Next继续 4.点击 ...
- Android 安全研究 hook 神器frida学习(一)
在进行安卓安全研究时,hook技术是不可或缺的,常用的有Xposed:Java层的HOOK框架,由于要修改Zgote进程,需要Root,体验过Xposed,整个过程还是很繁琐的,并且无法hook,na ...
- CVE-2017-12149 JBOOS反序列化漏洞复现
一.漏洞描述 2017年8月30日,厂商Redhat发布了一个JBOSSAS 5.x 的反序列化远程代码执行漏洞通告.该漏洞位于JBoss的HttpInvoker组件中的 ReadOnlyAccess ...
- U8CO使用C#版(一)
1.懒加载: object obj = null; System.Type oType = System.Type.GetTypeFromProgID("U8Login.clsLogin&q ...
- Docker - 配置加速器
https://www.daocloud.io/mirror#accelerator-doc curl -sSL https://get.daocloud.io/daotools/set_mirror ...
- jsp页面技术总结
1.日期框只能选择不能输入属性设置 data-options="editable:false" 2.列表中多出一列空白 .datagrid-view1{ width: 0px!im ...
- [leetcode]207. Course Schedule课程表
在一个有向图中,每次找到一个没有前驱节点的节点(也就是入度为0的节点),然后把它指向其他节点的边都去掉,重复这个过程(BFS),直到所有节点已被找到,或者没有符合条件的节点(如果图中有环存在). /* ...
- CI持续集成理论知识
(1)什么是CI What is CI? CI就是持续集成,持续集成是一种软件开发实践,即团队开发成员经常集成他们的工作,通常每个成员每天至少集成一次,也就意味着每天可能会发生多次集成.每次集成都通过 ...
- R绘图(1): 在散点图边缘加上直方图/密度图/箱型图
当我们在绘制散点图的时候,可能会遇到点特别多的情况,这时点与点之间过度重合,影响我们对图的认知.为了更好地反映特征,我们可以加上点的密度信息,比如在原来散点所在的位置将密度用热图的形式呈现出来,再比如 ...