使用c3p0连接池连接数据库时出现:Connections could not be acquired from the underlying database!

在配置正确的前提下,使用c3p0数据库连接池时遇到'Connections could not be acquired from the underlying database!'异常。通过将数据库驱动版本从5.1.6更新到5.1.44,成功解决问题。
摘要由CSDN通过智能技术生成

当使用c3p0连接数据库时,配置信息都没有错误,但是出现了如下情况:

下列信息中有一行是java.lang.RuntimeException: java.sql.SQLException: Connections could not be acquired from the underlying database!

也就是连接数据库失败

D:\sofeware\JDK8\JDK8installer\bin\java.exe -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:D:\sofeware\IntelliJ IDE\IntelliJ IDEA 2019.3.4\lib\idea_rt.jar=60323:D:\sofeware\IntelliJ IDE\IntelliJ IDEA 2019.3.4\bin" -Dfile.encoding=UTF-8 -classpath "D:\sofeware\IntelliJ IDE\IntelliJ IDEA 2019.3.4\lib\idea_rt.jar;D:\sofeware\IntelliJ IDE\IntelliJ IDEA 2019.3.4\plugins\junit\lib\junit5-rt.jar;D:\sofeware\IntelliJ IDE\IntelliJ IDEA 2019.3.4\plugins\junit\lib\junit-rt.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\charsets.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\deploy.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\access-bridge-64.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\cldrdata.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\dnsns.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\jaccess.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\jfxrt.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\localedata.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\nashorn.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\sunec.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\sunjce_provider.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\sunmscapi.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\sunpkcs11.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\ext\zipfs.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\javaws.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\jce.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\jfr.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\jfxswt.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\jsse.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\management-agent.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\plugin.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\resources.jar;D:\sofeware\JDK8\JDK8installer\jre\lib\rt.jar;D:\sofeware\IntelliJIDEAProjects\day02_eesy_02xmlIoC\target\classes;D:\sofeware\apache_maven_repository\org\springframework\spring-context\5.0.2.RELEASE\spring-context-5.0.2.RELEASE.jar;D:\sofeware\apache_maven_repository\org\springframework\spring-aop\5.0.2.RELEASE\spring-aop-5.0.2.RELEASE.jar;D:\sofeware\apache_maven_repository\org\springframework\spring-beans\5.0.2.RELEASE\spring-beans-5.0.2.RELEASE.jar;D:\sofeware\apache_maven_repository\org\springframework\spring-core\5.0.2.RELEASE\spring-core-5.0.2.RELEASE.jar;D:\sofeware\apache_maven_repository\org\springframework\spring-jcl\5.0.2.RELEASE\spring-jcl-5.0.2.RELEASE.jar;D:\sofeware\apache_maven_repository\org\springframework\spring-expression\5.0.2.RELEASE\spring-expression-5.0.2.RELEASE.jar;D:\sofeware\apache_maven_repository\org\springframework\spring-test\5.0.2.RELEASE\spring-test-5.0.2.RELEASE.jar;D:\sofeware\apache_maven_repository\commons-dbutils\commons-dbutils\1.4\commons-dbutils-1.4.jar;D:\sofeware\apache_maven_repository\mysql\mysql-connector-java\5.1.6\mysql-connector-java-5.1.6.jar;D:\so
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值