hi all,
i have a webapp taht uses Hibernate and MYSQL, running on top of tomcat.
i am letting Hibernate handle the connections to mysql db, since i have no connection pools defined in tomcat.
after running the application for nearly 9 hours, when i tried to use my app to connect to the database i got following exception:
Caused by: net.sf.hibernate.JDBCException: Could not execute query
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1476)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:45)
at com.myapp.hibernate.HibernatePersistenceManager.query(HibernatePersistenceManager.java:205)
... 31 more
Caused by: java.sql.SQLException: Communication link failure: java.net.SocketException, underlying cause: Software caused connection abort: recv failed
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: recv failed
STACKTRACE:
java.net.SocketException: Software caused connection abort: recv failed
now i have found thru the web a post that says following
Looks like there are other people having the same problem, the first suggestion was to use the Thread Local Session pattern, which I already had in place. The solution was to add the following properties to my hibernate.cfg.xml:
<property name="connection.autoReconnect">true</property>
<property name="connection.autoReconnectForPools">true</property>
<property name="connection.is-connection-validation-required">true</property>
but this does not work, as ihave added thos eproperties to hibernate properties file and i am still getting same exception
anyone can help on theissue?
thanx in advance adn regards
marco
|