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: Could not close a JDBC result set
PostPosted: Fri Oct 06, 2006 2:19 am 
Newbie

Joined: Sun Feb 19, 2006 2:46 pm
Posts: 6
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.1 The one coming with JBoss 4.0.4GA

Mapping documents: Too many. I don't think the mappings have anything to do with this If you think
otherwise I will post them

Code between sessionFactory.openSession() and session.close():

This method is called from an EJB and it seems to work ok but I suppose this is thrown when the transaction is about to close and the
ResultSet is already closed but I don't know why

public void attachDirty(User instance) {
log.debug("attaching dirty User instance");
try {
getCurrentSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}

Full stack trace of any exception that occurs:
08:52:38,203 WARN [AbstractBatcher] Could not close a JDBC result set
java.sql.SQLException: Already closed
at org.jboss.resource.adapter.jdbc.WrappedResultSet.close(WrappedResultSet.java:178)
at org.hibernate.jdbc.AbstractBatcher.closeStatements(AbstractBatcher.java:310)
at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:291)
at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:214)
at org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85)
at org.jboss.tm.TransactionImpl.doAfterCompletion(TransactionImpl.java:1526)
at org.jboss.tm.TransactionImpl.completeTransaction(TransactionImpl.java:1198)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:377)
at org.jboss.tm.TxManager.commit(TxManager.java:240)
at org.jboss.aspects.tx.TxPoliendTransaction(TxPolijava:175)
at org.jboss.aspects.tx.TxPoliinvokeInOurTx(TxPolijava:87)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:225)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)

Name and version of the database you are using: Oracle 10g

The generated SQL (show_sql=true):
update com.netc.banking.model.adm.User */ update NETDB.ADM_USER set MODIFY_DATE=?, ADM_APPLICATION_ID=?, MODIFY_USER=?, INSERT_USER=?, ADM_LOCATION_ID=?, USER_NAME=?, USER_LOGIN=?, USER_PASSWORD=?, TRY_COUNT=?, ACTIVE=?, INSERT_DATE=?, EMAIL=?, DELETED=?, DELETE_USER=?, DELETE_DATE=? where ID=? and MODIFY_DATE=?

Debug level Hibernate log excerpt:


I am using Hibernate as a JBoss service and everything seemed to work fine till I attempted to persist a user with usergroups
as a one to many relation ship. I don't think it has to do something with the objects. I think it's rather a configuration
problem or something. Maybe I am mistaken...

Thank you in advance


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 07, 2007 10:11 am 
Newbie

Joined: Wed Feb 07, 2007 10:02 am
Posts: 1
Hello,
I'm getting the same exception. This warning is issued per-insert/update (five inserts mean five exceptions). It appears ONLY when I use generated columns in my mapping file (generated="always"). The warning is generated when I close the Hibernate session.

DB: Oracle 10.2
Hibernate 3.2.1.ga

I suppose this is a problem in Hibernate (or incompatibility between Hibernate and Oracle JDBC).

Pavel


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.