-->
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.  [ 1 post ] 
Author Message
 Post subject: afterTransactionCompletion() was never called (committed)
PostPosted: Mon Jun 19, 2006 11:26 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 3

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

(note that the Array Index error is unrelated. it's throw from a JSP page that is called after the transaction is complete...)

I appreciate your time.
chris


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.