-->
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: Database connection lost
PostPosted: Thu Jul 29, 2004 11:55 am 
Newbie

Joined: Wed Jul 28, 2004 1:02 pm
Posts: 9
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 29, 2004 12:44 pm 
Newbie

Joined: Tue Jun 01, 2004 8:06 pm
Posts: 9
Location: Hamilton, Ontario, Canada
c3p0 maintains your connection to the database. Have a look at th3 c3p0 documentation to see if you can reconnect.

If you are using DB Stored Package variables on an Oracle database I would not recommend reconnecting to the database as these variables are session specific and are null until initialized.


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.