-->
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: afterTransactionCompletion() was never called (committed...)
PostPosted: Mon Jun 19, 2006 11:02 am 
Newbie

Joined: Fri Jan 16, 2004 9:32 am
Posts: 11
Hibernate version: 2.x

Name and version of the database you are using: MySQL

Hello. I have recently started seeing the following error:

afterTransactionCompletion() was never called

My research tells me that the successful execution of either commit or rollback should take care of this, but I'm still seeing the message. I even added some debug code to show me the value of session.wasCommitted(). This value is always true, but I still see the error message (frequently, but not always). Anything else I should be looking for?

Below is the finally {} block where I log/flush/close everything...

boolean wascommitted = false;
try {wascommitted = tx.wasCommitted(); } catch (HibernateException hibex) {logger.error("error calling wascommitted:"+hibex); }
logger.info("calling hibSession.close()...committed?"+wascommitted);
try {hibSession.flush();} catch (HibernateException hexflush) {logger.error("ex on hibSession.flush() "+hexflush);}
try {hibSession.close();} catch (HibernateException hex) {logger.error("ex on hibSession.close() "+hex);}

But I regularly see the following in the log (note the debug value == true):

398315 INFO com.ci.struts.action.GenericAction.execute:151 - calling hibSession.close()...committed?true
398445 WARN net.sf.hibernate.impl.SessionImpl.finalize:3241 - afterTransactionCompletion() was never called
pdf e:java.lang.ArrayIndexOutOfBoundsException: 216
398465 WARN net.sf.hibernate.impl.SessionImpl.finalize:3251 - unclosed connection

I appreciate your time.
chris


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 19, 2006 11:14 am 
Newbie

Joined: Fri Jan 16, 2004 9:32 am
Posts: 11
fyi - note that the ArrayIndex error in my log is unrelated. It is thrown in a jsp page that is called after the transaction is over...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 19, 2006 11:17 am 
Newbie

Joined: Sat Jun 17, 2006 9:44 am
Posts: 6
I'm unfortunately not able to help you with your problem, but this is the NHibernate (Hibernate for .NET) subforum, maybe you should post your question to the Hibernate (Java) forum?


Top
 Profile  
 
 Post subject: oops - ignore this thread...
PostPosted: Mon Jun 19, 2006 11:27 am 
Newbie

Joined: Fri Jan 16, 2004 9:32 am
Posts: 11
Oops - my apologies. Please ignore this thread.


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.