m0_55546898
m0_55546898
采纳率0%
2021-03-08 08:40

制作的系统点击登录提示遇到了未知的错误,并且页面显示大段红色代码

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 [D:\work_idea\HospitalizationManSys\out\artifacts\HospitalizationManSys_war_exploded\WEB-INF\classes\com\qut\mapper\UserMapper.xml] ### The error may involve com.qut.mapper.UserMapper.findUserById ### 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 The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • elvishehai thomas.he 1月前

    Could not get JDBC Connection 这个是说数据库异常,请检查下数据库的配置。

    点赞 1 评论 复制链接分享
  • qq_42319005 叫我磊哥 1月前

    先看看数据库的配置对么,连接的数据库是否是目标库,账号密码是否正确,IP地址端口号有没有问题,如果数据库连接都没有问题,

    看一下UserMapper.xml的xml文件SQL有没有写错,

    com.qut.mapper.UserMapper.findUserById这个方法有没有问题。

    点赞 1 评论 复制链接分享