-->
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: Problem with closed ResultSet when trying to refresh()
PostPosted: Wed Feb 18, 2009 11:44 am 
Newbie

Joined: Thu May 15, 2008 10:04 am
Posts: 7
Location: uk
Hibernate version: 3.2.6

Exception: java.sql.SQLException: Closed Resultset: next

Db: Oracle 9
Java: jdk1.4.2

Hi

Im running a junit test and trying to refresh an object that has a number of collections. One of them is a PersistentSet with one element before refresh() is called, but is set to null after the refresh.

Have done some debugging and found that the Closed Resultset exception is thrown in Loader.doQuery() at this line:
Code:
for ( count = 0; count < maxRows && rs.next(); count++ ) {


A cut down version of the mapping file, with the relevant collection definition is...

Code:
<hibernate-mapping>
    <class name="A" table="A">
.....
        <set cascade="all-delete-orphan" inverse="true" name="bs">
            <meta attribute="property-type">java.util.Collection</meta>
            <key>
                <column length="36" name="AId"/>
            </key>
            <one-to-many class="B"/>
        </set>
   </class>
</hibernate-mapping>


Is this a bug, or a quirk in what Im trying to do?
Cheers
Al.


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.