ibatis 访问 mysql 时的报错!!
报错信息如下所示`:
------------------------------------
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超时了!
希望大家帮帮忙!提供一个解决办法!