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

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

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条回答 默认 最新

  • 叫我磊哥 2021-03-08 08:55
    关注

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

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

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

    评论

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制