Hi experts,
We have the following hibernate configuration using c3p0 connection, based on
http://www.hibernate.org/214.html . However, we found the application is dead after the Oracle 9 got restarted or after a few days.
Does hibernate have the ability to reconnect to the database in such situation ? Do we have to get the better version of c3p0 ? Any help will be appreciated ?
---------------------------------------------------------------------------
Hibernate version: 2.01
Name and version of the database you are using:Oracle 9i
Server:Tomcat 4.1.29
hibernate.properties
hibernate.connection.username=user
hibernate.connection.password=password
hibernate.connection.url=jdbc:oracle:thin:@IMCOSL05.indygov.org:1521:test9
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect
hibernate.transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory
hibernate.c3p0.max_size=30
hibernate.c3p0.min_size=3
hibernate.c3p0.idle_test_period=50
hibernate.c3p0.max_statements=0
hibernate.c3p0.acquire_increment=1
hibernate.c3p0.timeout=0
Full stack trace of any exception that occurs:
Stack track of the exception:
2004-09-15 23:30:46,812 DEBUG org.indygov.hr.city.par.util.PARScheduleThread - Background processing is running!
2004-09-15 23:30:47,000 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 17410, SQLState: null
2004-09-15 23:30:47,015 ERROR net.sf.hibernate.util.JDBCExceptionReporter - No more data to read from socket
2004-09-15 23:30:47,015 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 17410, SQLState: null
2004-09-15 23:30:47,015 ERROR net.sf.hibernate.util.JDBCExceptionReporter - No more data to read from socket
2004-09-15 23:30:47,031 ERROR net.sf.hibernate.util.JDBCExceptionReporter - Could not execute query
java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:731)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:690)
at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:103)
at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:466)
at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:413)
at oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:432)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:182)
at oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedStatement.java:165)
at oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleConnection.java:604)
at oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection.java:485)
at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228)
at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:61)
at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:703)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:184)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:132)
at net.sf.hibernate.loader.Loader.doList(Loader.java:949)
at net.sf.hibernate.loader.Loader.list(Loader.java:940)
at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:833)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1475)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1454)
at org.indygov.hr.city.par.dao.par.PARTrackDAO.findByPARStatus(PARTrackDAO.java:362)
at org.indygov.hr.city.par.service.par.PARTrackService.findByPARStatus(PARTrackService.java:108)
at org.indygov.hr.city.par.web.par.BackgroundProcess.handleIdle(BackgroundProcess.java:105)
at org.indygov.hr.city.par.web.par.BackgroundProcess.start(BackgroundProcess.java:64)
at org.indygov.hr.city.par.util.PARScheduleThread$PARBackGroundTask.run(PARScheduleThread.java:46)
at java.util.TimerThread.mainLoop(Timer.java:432)
at java.util.TimerThread.run(Timer.java:382)
2004-09-15 23:30:47,046 ERROR org.indygov.hr.city.par.dao.par.PARTrackDAO - Hibernate ExceptionCould not execute query
2004-09-15 23:30:47,046 ERROR org.indygov.hr.city.par.web.par.BackgroundProcess - net.sf.hibernate.JDBCException: Could not execute query
----------------------------------------------