We have Tomcat 4.1, Oracle 9, Hibernate2.0.1 for an application.
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 ?
Hibernate version: 2.0.1
hibernate properties flie:
hibernate.connection.username=APP
hibernate.connection.password=123Test
hibernate.connection.url=jdbc:oracle:thin:@testserver.indygov.org:1521:ORAT9
hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect
hibernate.transaction.factory_class=net.sf.hibernate.transaction.JDBCTransactionFactory
c3p0.initialPoolSize=3
c3p0.minPoolSize=3
c3p0.maxPoolSize=30
c3p0.maxIdleTime=100
c3p0.maxStatements=0
c3p0.acquireIncrement=1
Stack track of the exception:
2004-07-15 23:30:46,812 DEBUG org.indygov.hr.city.par.util.PARScheduleThread - Background processing is running!
2004-07-15 23:30:47,000 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 17410, SQLState: null
2004-07-15 23:30:47,015 ERROR net.sf.hibernate.util.JDBCExceptionReporter - No more data to read from socket
2004-07-15 23:30:47,015 WARN net.sf.hibernate.util.JDBCExceptionReporter - SQL Error: 17410, SQLState: null
2004-07-15 23:30:47,015 ERROR net.sf.hibernate.util.JDBCExceptionReporter - No more data to read from socket
2004-07-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-07-15 23:30:47,046 ERROR org.indygov.hr.city.par.dao.par.PARTrackDAO - Hibernate ExceptionCould not execute query
2004-07-15 23:30:47,046 ERROR org.indygov.hr.city.par.web.par.BackgroundProcess - net.sf.hibernate.JDBCException: Could not execute query
Debug level - debug
|