赞
踩
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
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。