Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database connection getting cloesd when the application is running

 
balaji anatha padmanaban
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using hibernate,struts and EJB in my application.In my development server the application is running without any issues,but in test server
the database connection getting closed at some times and the connetion is resumes within several minutes. I am not able to understand why the connection fails at some times only.I am not able to continue my transaction.

I am using hibernate.cfg.file to make a connection and not using data source .The connection pool for this application is one and it is configured in xml file.
The exception I got:
JDBCException E org.hibernate.util.JDBCExceptionReporter logExceptions Closed Connection
[4/6/09 5:30:00:174 EDT] 00000042 JDBCTransacti E org.hibernate.transaction.JDBCTransaction rollback JDBC rollback failed
java.sql.SQLException: Closed Connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:1161)
at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:183)
at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:162)
at com.att.it.pie.ls.DOManager.GraniteManager.fetchGrntToPieDtls(GraniteManager.java:522)
at com.att.it.pie.ls.ejb.mdb.ProcessOrder.sendReplyToGranite(ProcessOrder.java:410)
at com.att.it.pie.ls.ejb.granite.PlugInQueryBean.sendReplyToGranite(PlugInQueryBean.java:266)
at com.att.it.pie.ls.ejb.granite.EJSRemoteStatelessPlugInQuery_8270f22d.sendReplyToGranite(EJSRemoteStatelessPlugInQu
ery_8270f22d.java:68)
at com.att.it.pie.ls.ejb.granite._PlugInQuery_Stub.sendReplyToGranite(_PlugInQuery_Stub.java:323)
at com.att.it.pie.ls.delegate.MiscDelegate.callGraniteProcess(MiscDelegate.java:940)
at com.att.it.pie.ls.client.util.GraniteJob.execute(GraniteJob.java:64)
at org.quartz.core.JobRunShell.run(JobRunShell.java:202)

Please help me find the solution
If you need any more information let me know.

Thanks
Balaji
 
Francois Nadeau
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Need a little more info:

1. Which database are you using?
2. Are you using Hibernate's default pool manager?
3. How long does it take for the connection to Fail (is it constant)?

I had a similar problem with MySQL closing the connection after 24 hours of inactivity.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic