This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes spring / ibatis issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "spring / ibatis issue" Watch "spring / ibatis issue" New topic
Author

spring / ibatis issue

Pravin Mani
Greenhorn

Joined: Mar 17, 2010
Posts: 1
Hi,
I have used Spring / ibatis. when the server is idle for long time and when there exists a transaction into database the following error is thrown
Apr 13, 2011 10:51:25 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
Apr 13, 2011 10:51:25 AM org.springframework.jdbc.support.SQLErrorCodesFactory <init>
INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
org.springframework.dao.DataAccessResourceFailureException: SqlMapClient operation; SQL [];
--- The error occurred in xxx/xxx/xxx/xxxx/xxxx.xml.
--- The error occurred while applying a parameter map.
--- Check the checkprofile-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 67,890,506 milliseconds ago. The last packet sent successfully to the server was 67,890,506 milliseconds ago. 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.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in xxx/xxx/xxx/xxxx/xxxx.xml.
--- The error occurred while applying a parameter map.
--- Check the checkprofile-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 67,890,506 milliseconds ago. The last packet sent successfully to the server was 67,890,506 milliseconds ago. 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.



But 2nd transaction with DB was successful . ie. only the first transaction fails when the server is idle for much time.

After research I included the following property in spring-config.xml



But doesnt help to solve my isssue.

Could any one guide me on this issue??? Thanks.
 
Consider Paul's rocket mass heater.
 
subject: spring / ibatis issue
 
Similar Threads
Problem at connection
ERROR org.hibernate.util.JDBC Exception Reporter
MySQL + Hibernate: HTTP servlet broken pipe with entity manager
Communication EXCEPTION
[MySQL] Connection reset by peer: socket write error