SSM整合Bug–c3p0获取jdbc连接失败
项目场景:
在SSM项目整合中,dao层获取数据失败
使用数据库连接池c3p0 0.9.5.5
问题描述:
HTTP状态 500 - 内部服务器错误
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
###
Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
进行单元测试
控制台报错:
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!