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.