ibatis 访问 mysql 时的报错!!

PhoeNix_412 2007-09-12 10:55:03
报错信息如下所示`:
------------------------------------

2007-09-12 09:35:33, 警告, admin, com.ibatis.dao.client.DaoException: Failed to execute queryForObject - id [getUserInfoByUserid],
parameterObject [admin]. Cause: com.ibatis.common.jdbc.exception.NestedSQLException:

--- The error occurred in com/gogaku/account/persistence/sqlmapdao/sql/UserInfo.xml.
--- The error occurred while executing query.
--- Check the SELECT USER_ID AS userid, USER_NAME AS userName, PASSWORD AS password, AUTHORITY AS authority, ACCESS AS access FROM T_SM_USER_INFO WHERE USER_ID = ? AND DFLG = 0 .
--- Check the SQL Statement (preparation failed).
--- Cause: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:


** BEGIN NESTED EXCEPTION **

com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception:
---------------------------------

长时间不访问的话会出现这个问题,重新访问一下就恢复正常了!!

好像因为mysql的wait_timeout超时了!

希望大家帮帮忙!提供一个解决办法!
...全文
182 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
PhoeNix_412 2007-09-14
  • 打赏
  • 举报
回复
up by myself

50,530

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧