com.mchange.v2.resourcepool.CannotAcquireResourceException

Exception in thread "main" java.sql.SQLException: Connections could not be acquired from the underlying database!
<pre name="code" class="html">Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.



这是链接不到数据库,原因多种,我遇到一种,就是我的数据库没有设置密码,而我设置了密码去使用

user=root
password=123
driverclass=com.mysql.jdbc.Driver
jdbcurl=jdbc:mysql://localhost:3306/hibernate


后来改成无密码,则对上了

user=root
password=
driverclass=com.mysql.jdbc.Driver
jdbcurl=jdbc:mysql://localhost:3306/hibernate


原文地址:https://www.cnblogs.com/share2015/p/5271616.html