-->
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: Stale Connections with c3p0
PostPosted: Wed Jul 12, 2006 2:55 pm 
Newbie

Joined: Wed Jul 12, 2006 2:45 pm
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: Hibernate 3.0

Mapping documents:
<property name="hibernate.c3p0.acquire_increment">5</property>
<property name="hibernate.c3p0.max_size">50</property>
<property name="hibernate.c3p0.min_size">20</property>
<property name="hibernate.c3p0.timeout">5</property>

<property name="hibernate.c3p0.validate">true</property>
<property name="hibernate.c3p0.idle_test_period">5</property>


c3p0.properties

c3p0.acquireRetryDelay=100000
c3p0.acquireRetryAttempts=100
c3p0.breakAfterAcquireFailure=false
c3p0.maxIdleTime=5
c3p0.idleConnectionTestPeriod=5
c3p0.testConnectionOnCheckout=true
c3p0.testConnectionOnCheckin=true
c3p0.preferredTestQuery=select 1 from dual



Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:


Name and version of the database you are using: Oracle 9i

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
java.sql.SQLException: Io exception: Connection reset by peer: socket write error
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:389)
at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:413)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:119)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:92)
at oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnection.java:950)
at oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:802)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:351)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:302)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:85)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1090)
at org.hibernate.loader.Loader.doQuery(Loader.java:362)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:203)
at org.hibernate.loader.Loader.doList(Loader.java:1499)
at org.hibernate.loader.Loader.list(Loader.java:1482)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1246)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)


with the settings above I am still not able to over come the stale connections problem was trying all sorts of combinations but could not do it.

Suggestions will be appreciated.


Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 12, 2006 3:12 pm 
Newbie

Joined: Wed Jul 12, 2006 2:45 pm
Posts: 2
Sorry, I should have given this information before.
This stack trace might be helpful in solving the problem

Thanks


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