The main problem I found in the stack trace is this: 2013-03-31 13:21:11 [SEVERE] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 30,491,788 milliseconds ago. The last packet sent successfully to the server was 30,491,788 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. 2013-03-31 13:21:11 [SEVERE] Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 30,491,788 milliseconds ago. The last packet sent successfully to the server was 30,491,788 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.
The connection you get when you call Prism.dbc(); is actually one of the connection pool; and in this particular case, the combined connection is interrupted. It states that there was no successful connection for more than 8 hours between the JDBC connection in the pool and the database. Perhaps this is because of the wait_timeout mentioned, defined on the database server, or the firewall dropped the connection or something else; There can be many reasons why a connection is broken.
You must follow the recommendations made by the exception to solve this problem.
source share