-->
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.  [ 4 posts ] 
Author Message
 Post subject: Collection "corruption"
PostPosted: Fri Jun 30, 2006 12:13 pm 
Beginner
Beginner

Joined: Wed Oct 01, 2003 3:47 pm
Posts: 44
I'm witnessing the following behavior in JBoss 4.0.4 EJB3-8, Seam extended manager persistence:

- Everything generally starts out working just fine.

- Next, make *many* (>5) changes to the collections (OneToMany) of a specific object. These are Sets with appropriately implemented equals/hashcode. All objects have a version column.

- After a certain number of changes / commits, the object's collections become "corrupt" (defined next). Additionally, any other objects which are further loaded also have "corrupt" collections.

- By corrupt I mean that the collections, which were were working prior to this point, now only load the *first entry*. All subseqent loads of that object and any other objects of that type show only the first entry in their collections despite the database containing data otherwise.

- No errors or exceptions are thrown or reported by Hibernate. In fact, the DEBUG logs for hibernate show that it is actually ACCESSING each and every collection entry that DOES exist in the database. In other words, the objects do exist in the database, hibernate accesses / reads them as is shown in the DEBUG log, but only the very first entry is populated into the collection's "view".

- This then appears to affect all future sessions opened as the only remedy is a reboot of JBoss.

Any ideas or places to look for further information? I've been working at this for over a week and am out of ideas.

Ryan


Top
 Profile  
 
 Post subject: Re: Collection "corruption"
PostPosted: Fri Jun 30, 2006 4:53 pm 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
rdewell wrote:
- No errors or exceptions are thrown or reported by Hibernate. In fact, the DEBUG logs for hibernate show that it is actually ACCESSING each and every collection entry that DOES exist in the database. In other words, the objects do exist in the database, hibernate accesses / reads them as is shown in the DEBUG log, but only the very first entry is populated into the collection's "view".


How does it show that only first entity is loaded?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 30, 2006 6:30 pm 
Beginner
Beginner

Joined: Wed Oct 01, 2003 3:47 pm
Posts: 44
The object that I get back out of the entity manager from "load" only has one entry in its collection.

This is despite the fact that:

- on previous loads (before the "error" occurs) all of the entries show in the collection.
- the database shows multiple entries for the collection.
- hibernate's own debug log show it "reading" all of the entries that *should* be in the collection

Regardless, just one object shows up in the loaded object. Unfortunately I haven't been able to create a specific set of actions that reproduces it every single time. It seems to be associated with making many changes to the existing collection, however.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 30, 2006 11:21 pm 
Beginner
Beginner

Joined: Wed Oct 01, 2003 3:47 pm
Posts: 44
It's true what they say, that it's helpful to talk things out. :) I only wish I'd done it a week ago.

Problem solved. This turned out to be a problem with the Facelets library in the view layer. There is a problem with their "ui:repeat" tag which inexplicably gets corrupted at some point. Of course I was using ui:repeat to iterate over my collections which gave the appearance of it being a problem with the underlying collection. Not so.

Finally, back to work.


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