HibernateException « Collection « JPA Q&A





1. Found shared references to a collection org.hibernate.HibernateException    stackoverflow.com

I got this error message : error: Found shared references to a collection: Person.relatedPersons when I tried to save addToRelatedPersons(anotherPerson) :

person.addToRelatedPersons(anotherPerson);
anotherPerson.addToRelatedPersons(person);

anotherPerson.save();
person.save();
my domain :
Person {

 static hasMany = [relatedPersons:Person];

}
any idea why this happens ? ...

2. Caused by: org.hibernate.HibernateException: Found shared references to a collection    stackoverflow.com

I am running this exception:

Caused by: org.hibernate.HibernateException: Found shared references to a collection: path.Object.listObjects  
This is my code:
Object.java
protected List<ListedObject> listObjects ;  

....  
@OneToMany(cascade=CascadeType.ALL)
  ...

3. HibernateException: Found two representations of same collection    stackoverflow.com

If I save an object containing the following list

@OneToMany(cascade=CascadeType.ALL, mappedBy="taskList")
@OrderColumn(name="position", nullable=false)
public List<Task> tasks = new ArrayList<Task>();
I get the exception
org.hibernate.HibernateException: Found two representations of same collection
The code in the Play! controller looks ...

4. HibernateException: reassociated object has dirty collection    forum.hibernate.org

I have already described this problem in a reply to another topic [NullPointerException in SessionImpl.getOrphans()], but nobody seems to look at it. So here it is again ;-) In the other topic, Gavin asked me to put a line of code into Hibernate 2.1.2 in order to fix another issue: Quote: Add the following line to SessionImpl.doUpdateMutable(): Code: if ( ( ...

5. HibernateException: Found shared references to a collection    forum.hibernate.org

Here are [some] details concerning the exception that I am getting... Any insight into...or pointers to more documentation on the message? Thanks in advance Environment JDK 1.4 Hibernate 2.1 MYSQL 4.1 TABLE(s) Followed by mapping(s) CREATE TABLE `tcampaign` ( `UID_PK` int(11) NOT NULL auto_increment, `name` varchar(100) default NULL, `description` varchar(200) default NULL, PRIMARY KEY (`UID_PK`) ) ...

6. org.hibernate.HibernateException: collection was evicted    forum.hibernate.org

Login Register FAQ Search View unanswered posts | View active topics Board index Hibernate & Java Persistence Hibernate Users All times are UTC - 5 hours [ DST ] org.hibernate.HibernateException: collection was evicted Page 1 of 1 [ 1 post ] Previous topic | Next ...