-->
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.  [ 4 posts ] 
Author Message
 Post subject: Unpredictable "session disconnected" exceptions
PostPosted: Mon Aug 02, 2004 1:29 pm 
Newbie

Joined: Mon Aug 02, 2004 10:33 am
Posts: 2
Hi,

Environment:

- BEA weblogic 8.1 SP2,
- Oracle 9,
- Hibernate using application server (AS) datasources,
- Struts encapsulated by BEA,
- Model-View-Controler (MVC) architecture.

Description:

when using hibernate, we face time to time some "Session is currently disconnected" exception (details of this exception below).

The strange point is that this exception appears time to time. Then, after several unsuccessfull tries, the application usually allows us to go further deeper in the process.

Questions/needs:
    [Q1] reason of such deconnection: which layer can cause such deconnections, DB, Application Server, hibernate itself?
    [Q2] ways to solve such problem: should we reconnect the session each time before using it?
    [Q3] chaotic results: why this exception is thrown time to time, not always, in different places in our code?


Detail of the exception:
Code:
Caused by: net.sf.hibernate.HibernateException: Session is currently disconnected
    at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3143)
    at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
    at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
    at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2158)
    at pl.com.lukas.k2.customersummary.dao.CsCustomerDao.getUniverse(CsCustomerDao.java:177)
    at pl.com.lukas.k2.customeracquisition.SaleController.bdl.BasicDataExtendedBdl.clientDataRetrieval(BasicDataExtendedBdl.java:1041)
    at Sale.SaleController.PassCodeDecision(SaleController.jpf:682)
    at sun.reflect.GeneratedMethodAccessor775.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:1495)
    at com.bea.wlw.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:1430)
    at com.bea.wlw.netui.pageflow.FlowController.internalExecute(FlowController.java:761)
    at com.bea.wlw.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:211)
    at com.bea.wlw.netui.pageflow.FlowController.execute(FlowController.java:591)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:651)
    at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
    at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6354)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 02, 2004 1:31 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Most likely your connection pool doing funny things.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 03, 2004 1:51 pm 
Newbie

Joined: Mon Aug 02, 2004 10:33 am
Posts: 2
Would it be possible to get some more details about your suggestion?

Actually, we are facing this problem for several weeks now, and it is becoming annoying. Unfortunatly, we did not figure out any pattern to make this happening every time.

Hope you will be able to give us tricks or other advices.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 04, 2005 5:28 am 
Newbie

Joined: Wed Sep 29, 2004 10:36 am
Posts: 8
Location: Berlin, Germany
Have you found a solution to your problem?
I'm encountering the same problems and have no idea where to start to solve them.

Thanks,
Oliver


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.