-->
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.  [ 2 posts ] 
Author Message
 Post subject: ERROR Invalid state, the Connection object is closed
PostPosted: Fri Aug 05, 2016 10:34 am 
Newbie

Joined: Thu Aug 04, 2016 6:42 pm
Posts: 3
I request help in understanding impact, root cause and recovery from the following intermittent error:
WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper SQL Error: 0, SQLState: 08S01
ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper I/O Error: Connection timed out

After the above error is hit; all subsequently query to database consistently throw following errors; Is there a configuration setting to recover from the above errors without requiring restart:
WARN org.hibernate.engine.jdbc.spi.SqlExceptionHelper SQL Error: 0, SQLState: HY010
ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper Invalid state, the Connection object is closed.

Application database pool configuration in tomcat is as follows:
<Resource name="jdbc/xxxx" auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://xxxxxxxx"
maxTotal="20"
maxIdle="10"
maxWaitMillis="-1"/>


Versions
jdk.version 1.8
hibernate.version 4.3.5.Final
jboss.bom.eap.version 6.4.0.GA

Thanks, I appreciate.


Top
 Profile  
 
 Post subject: Re: ERROR Invalid state, the Connection object is closed
PostPosted: Fri Aug 05, 2016 4:02 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
The database might terminate the connection, nut the connection pool is not aware of that. According to Tomcat DBCP configs, you could use:

- testOnBorrow = true
- testWhileIdle = true


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.