Hi, I get this error message after my service runs for some hours. Throwable occured in ResultFileHandler of Portage service: ### Error querying database. Cause: com.mysql.jdbc.exceptions. jdbc4.CommunicationsException: The last packet successfully received from the server was37995 seconds ago.The last packet sent successfully to the server was 37995 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. ### The error may involve iBATIS3.Xml.UserMapper.searchEmailTask-Inline ### The error occurred while setting parameters ### Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was37995 seconds ago.The last packet sent successfully to the server was 37995 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
I am using iBatis3.The following is my configuration file. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//ibatis.apache.org//DTD Config 3.0//EN" "http://ibatis.apache.org/dtd/ibatis-3-config.dtd"> <configuration> <environments default="development"> <environment id="development"> <transactionManager type="JDBC"/> <dataSource type="POOLED"> <property name="driver" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql:// 10.23.1.155:3306/bulkupload" /> <property name="username" value="freebird"/> <property name="password" value="770328"/> </dataSource> </environment> </environments> <mappers> <mapper resource="iBATIS3/Xml/user.map.xml" /> </mappers> </configuration> How to correct it? Thanks. 陈抒 Best regards http://blog.csdn.net/sheismylife