A ResourcePool could not acquire a resource from its primary factory or source.

严重: Servlet.service() for servlet [dispatcherServlet] in context with path [/heima_ssm_web1] threw exception [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!
### The error may exist in com/itheima/ssm/dao/IProductDao.java (best guess)
### The error may involve com.itheima.ssm.dao.IProductDao.findAll
### The error occurred while executing a query
### 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!] with root cause
com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.

 

问题解决

1.检查数据库配置;

2.如果你和我一样也是虚拟机中的数据库,检查虚拟机中数据库是否还能链接

转载于:https://www.cnblogs.com/hawk-li/p/10841929.html

你可能感兴趣的:(A ResourcePool could not acquire a resource from its primary factory or source.)