-->
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: exception clearing maxRows/queryTimeout when bath update
PostPosted: Tue Aug 30, 2005 5:41 pm 
Hello,
I got the following exception when I migrate my code from hibernate 2.1.8 to hibernate 3.0.5 (Spring framework in middle tier 1.2.3). The exception happens when I do batchupdate:

Sample code :

ScrollableResults myapps=
session.getNamedQuery("abc")
.setParameterList("products", products)
.scroll(ScrollMode.FORWARD_ONLY);

int count=0;
while ( myapps.next() ) {
Product p = (Product) applications.get(0);
p.setName("test1");

if ( ++count % BATCH_SIZE == 0 ) {
session.flush();
session.clear();
}


Hibernate version:3.0.5

Mapping documents:

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

Full stack trace of any exception that occurs:

[08-30 17:34:08] JtaTransactionManager.java:734 - Committing JTA transaction
[08-30 17:34:08] AbstractPlatformTransactionManager.java:692 - Triggering afterC
ompletion synchronization
[08-30 17:34:08] SessionFactoryUtils.java:773 - Closing Hibernate Session
[08-30 17:34:08] AbstractBatcher.java:313 - about to close ResultSet (open Resul
tSets: 1, globally: 1)
[08-30 17:34:08] AbstractBatcher.java:208 - exception clearing maxRows/queryTime
out
java.sql.SQLException: Statement has already been closed
at weblogic.jdbc.wrapper.Statement.checkStatement(Statement.java:231)
at weblogic.jdbc.wrapper.Statement.preInvocationHandler(Statement.java:8
3)
at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_T4CPrepare
dStatement.getMaxRows(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatche
r.java:204)
at org.hibernate.jdbc.AbstractBatcher.closeStatements(AbstractBatcher.ja
va:254)
at org.hibernate.jdbc.ConnectionManager.cleanup(ConnectionManager.java:2
59)
at org.hibernate.jdbc.ConnectionManager.close(ConnectionManager.java:194
)
at org.hibernate.impl.SessionImpl.close(SessionImpl.java:289)
at org.springframework.orm.hibernate3.SessionFactoryUtils.doClose(Sessio
nFactoryUtils.java:775)
at org.springframework.orm.hibernate3.SessionFactoryUtils.closeSessionOr
RegisterDeferredClose(SessionFactoryUtils.java:764)
at org.springframework.orm.hibernate3.SessionFactoryUtils.access$100(Ses
sionFactoryUtils.java:86)
at org.springframework.orm.hibernate3.SessionFactoryUtils$SpringSessionS
ynchronization.afterCompletion(SessionFactoryUtils.java:957)
at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:724)
at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:696)
at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.processCommit(AbstractPlatformTransactionManager.java:533)
at org.springframework.transaction.support.AbstractPlatformTransactionMa
nager.commit(AbstractPlatformTransactionManager.java:468)
at org.springframework.transaction.interceptor.TransactionAspectSupport.
doCommitTransactionAfterReturning(TransactionAspectSupport.java:258)
at org.springframework.transaction.interceptor.TransactionInterceptor.in
voke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:174)

Name and version of the database you are using: Oracle 9i


Top
  
 
 Post subject:
PostPosted: Fri Sep 02, 2005 12:24 pm 
Newbie

Joined: Thu Sep 01, 2005 11:16 am
Posts: 1
This is warning stack trace. I guess we can ignore it.


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.