-->
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.  [ 3 posts ] 
Author Message
 Post subject: afterTransactionCompletion() was never called
PostPosted: Thu Mar 03, 2005 3:23 pm 
Newbie

Joined: Thu Mar 03, 2005 2:57 pm
Posts: 3
Hello. I am using hibernate 2.1.8 with Oracle 9.2.0.6
I get this warning: "-afterTransactionCompletion() was never called"
when I use a hibernate session to do query directly to Oracle (without a mapping)

the code looks as follows:

......
aSession = getSession();
qry = tcu.traduciParaXmlType(queryIngresado);
sb.append(
"select documento, guid, nombretribunal, partes, fechasentencia from "
+ xmlTable
+ " where"
+ " "
+ qry
+ " order by fechasentencia desc");
stmt =(OraclePreparedStatement) aSession.connection().prepareStatement(sb.toString());
rs = (OracleResultSet) stmt.executeQuery();
DocumentoDTO docDTO;
while (rs.next()) {
docDTO =
new DocumentoDTO(
rs.getLong(1),
rs.getString(2),
"Jurisprudencia",
rs.getString(3)
+ " - "
+ rs.getString(4)
+ " - "
+ rs.getDate(5).toString());
al.add(docDTO);

}
rs.close();
stmt.close();

....
It gives me this warning in the first execution of this while loop (first row it gets), one warning per rs.getXXX. The remaining iterations (rows) don´t throw any warning. We close the session after querying. I tried using session.flush() and session.clear() before iterating the resultset . session.flush() works sometimes, I guess it fails because we are using this session in other part of the code. Adding session.flush in every plausible place doesn´t work either in all cases.
It seems to be working fine (no warning) when querying via hibernate (using a mapping).
Any ideas how to work around this warning. We have in production the same code but with hibernate 2.0 final and we get no warning.
Thank you in advance for your help. Mariano


Top
 Profile  
 
 Post subject: has anyone experience this with hand coded JDBC?
PostPosted: Mon Mar 07, 2005 10:41 am 
Newbie

Joined: Thu Mar 03, 2005 2:57 pm
Posts: 3
As far as I see it causes no consequences except for a console full of
afterTransactionCompletion was never called

I only experience this with hand coded JDBC. Anyone any idea?
Thanks in advance Mariano.


Top
 Profile  
 
 Post subject: Hand coded JDBC
PostPosted: Mon Mar 07, 2005 12:13 pm 
Newbie

Joined: Thu Mar 03, 2005 2:57 pm
Posts: 3
It´s not exact to call it Hand coded JDBC because it´s not entirelly jdbc. We use hibernate to get a session, in the application we are always using hibernate sessions. Our database utilization in some methods is a hybrid hibernate session with oracle preparedStatements, the rest is all hibernate. We use oracle XMLType so we need oracle preparedStatements in some cases. Thank you in advance. Mariano


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