严重: Servlet.service() for servlet [book] in context with path [] 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: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
The error may exist in file [C:\serverEnvirenment\tomcat\apache-tomcat-8.5.43\wtpwebapps\LibrarySystem-master\WEB-INF\classes\MyBatis\readerCard.xml]
The error may involve com.library.dao.ReaderCardDao.getIdMatchCount
The error occurred while executing a query
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
数据库连接失败,请检查是否启动,连接字符串的IP,端口设置是否正确。
检查一下映射吧
数据库连接失败,检查数据库是否打开。数据库链接账号,密码,url是否正确
未连接上数据库 查看配置文件中数据库连接驱动是否正确 账号密码url,还有驱动jar 包括服务是否开启 可逐步查看,有问题可继续深入交流 点我头像私我