Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was51906 milliseconds ago.The last packet sent successfully to the server was 51906 milliseconds 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.
Increasing the timeout doesn't sound good solution. The other solution is to use the property 'autoReconnect=true',which I have already applied.
From Apache Tomcat 6.0,context.xml (I guess it's called JNDI?) :
How can I get rid of this exception? This sounds like general issue.
PS : I am using hibernate3. Is there any such property to configure into hibernate config file or the solution lies into JDBC connection string or MySQL server side?