-->
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: Session is Closed! error in Transaction.commit.
PostPosted: Tue Mar 13, 2012 3:00 am 
Newbie

Joined: Tue Mar 13, 2012 2:56 am
Posts: 1
org.hibernate.SessionException: Session is closed!
at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:72)
at org.hibernate.impl.SessionImpl.getActionQueue(SessionImpl.java:1948)
at org.hibernate.impl.SessionImpl.afterTransactionCompletion(SessionImpl.java:605)
at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:274)
at org.hibernate.transaction.synchronization.CallbackCoordinator.afterCompletion(CallbackCoordinator.java:146)
at org.hibernate.transaction.synchronization.HibernateSynchronizationImpl.afterCompletion(HibernateSynchronizationImpl.java:60)
at weblogic.transaction.internal.ServerSCInfo.doAfterCompletion(ServerSCInfo.java:1048)
at weblogic.transaction.internal.ServerSCInfo.callAfterCompletions(ServerSCInfo.java:1023)
at weblogic.transaction.internal.ServerTransactionImpl.callAfterCompletions(ServerTransactionImpl.java:3025)
at weblogic.transaction.internal.ServerTransactionImpl.afterCommittedStateHousekeeping(ServerTransactionImpl.java:2926)
at weblogic.transaction.internal.ServerTransactionImpl.setCommitted(ServerTransactionImpl.java:2971)
at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2754)
at weblogic.transaction.internal.ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2662)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:291)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:240)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:300)
at weblogic.transaction.internal.TransactionManagerImpl.commit(TransactionManagerImpl.java:294)
at org.hibernate.transaction.JTATransaction.commit(JTATransaction.java:154)


Hi I am getting the above error and I am using hibernate3.0.jar, the transaction gets commited, but the error log show the above error, I believe the session is getting closed. Can anyone please help.

Thanks,
Rahul


Top
 Profile  
 
 Post subject: Re: Session is Closed! error in Transaction.commit.
PostPosted: Tue Mar 13, 2012 3:23 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hi,

I suggest you to debug the app by putting a breakpoint at JTATransaction.java:154
When the app halts on the breakpoint, check if the hibernate-session is open (check boolean field closed of SessionImpl object) at that point.

Try also to find out if the exception is due concurrent access to the same session out from 2 different threads (something like 2 threads are performing commit on the same session) or if this exception also occurs with single threads.


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.