Getting weird behaviour with hibernate Collections. Getting exception "Found Shared references" only once in the lifecyle of the server(Jboss 4.x), when application tries first time to save a obj which has a collection(it is not mapped to any other class, so there is no circular and multiple references.). After first time, application works fine throughout the server lifecycle.
I did googling and got some idea to create new instance of collection reset it, but now getting some other exception : collection was processed twice by flush()
Exceptions :
Caused by: org.hibernate.AssertionFailure: collection was processed twice by flush()
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.HibernateException: Found shared references to a collection:
Hibernate version : 3.1.3
Jboss : 4.x
JDK : 1.5
I am stuck here and any help would be highly appreciated.
|