I am getting this error (not so frequently):
2013-05-08 16:44:35,786 WARN (JDBCExceptionReporter.java:100) [org.hibernate.util.JDBCExceptionReporter, logExc
I'm answering on specific to this error code(08s01).
usually, MySql close socket connections are some interval of time that is wait_timeout defined on MySQL server-side which by default is 8hours. so if a connection will timeout after this time and the socket will throw an exception which SQLState is "08s01".
1.use connection pool to execute Query, make sure the pool class has a function to make an inspection of the connection members before it goes time_out.
2.give a value of
3.use another parameter in your connection URL, but this method is not recommended, and maybe deprecated.