A ResourcePool could not acquire a resource from its primary factory or source.
阿新 • • 發佈:2019-05-10
myba exc led otg can get bat servle data ### 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.
嚴重: 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 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
問題解決
1.檢查數據庫配置;
2.如果你和我一樣也是虛擬機中的數據庫,檢查虛擬機中數據庫是否還能鏈接
A ResourcePool could not acquire a resource from its primary factory or source.