-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Connection problems with Hibernate/Tomcat50./mysql
PostPosted: Wed Jul 28, 2004 8:40 am 
Beginner
Beginner

Joined: Thu Apr 29, 2004 4:31 am
Posts: 42
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.