-
今天学习连接池c3p0遇到这个错误 java.sql.SQLException: Connections could not be acquired from the underlying database!
-
刚开始还以为是c3p0-config.xml 配置有问题 看了半天没错 之后又以为是mysql版本的问题 于是去更改mysql的版本 发现还是这个错误
-
在仔细看看这个错误Connections could not be acquired from the underlying database!
无法获取database 然道是没有找到配置文件? 不对啊 我明明放在包下面
-
于是我尝试着把配置文件放在src根目录下面
-
-
再次运行
-
结果 居然成功了!
-
哈哈 原来c3p0指定读取配置文件的位置是在src根目录下面
java.sql.SQLException: Connections could not be acquired from the underlying database!
最新推荐文章于 2023-03-19 11:25:50 发布