-->
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: Illegal Attempt to Association Collection with Two Sessions
PostPosted: Wed Sep 10, 2008 9:19 pm 
Beginner
Beginner

Joined: Thu Feb 21, 2008 3:31 pm
Posts: 34
Hi,

I am having problems updating an object. I am using HibernateInSessionInterceptor to open a session as needed for the web layer, but not sure if that may be the problem. The object I am updating extends the User class and is mapped with InheritanceType.JOINED. I have collections in both the User class and Member class, some are eager and some are lazy. Going through the logs with the output set to DEBUG, it appears that all the collections are loaded fine, but I cannot tell what is opening another session.

Any ideas what I should be looking for exactly?

Please let me know if you need more information or configuration files.

Code:
Nested in org.springframework.orm.hibernate3.HibernateSystemException: Illegal attempt to associate a collection with two open sessions; nested exception is org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions:
org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions


This doesn't tell me which collection it is having problems with, so I am unsure what else I can do to fix this problem.


Walter


Top
 Profile  
 
 Post subject: [SOLVED]
PostPosted: Sun Oct 05, 2008 7:49 pm 
Beginner
Beginner

Joined: Thu Feb 21, 2008 3:31 pm
Posts: 34
Hi,

I fixed this by used merge instead of update.

Walter


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.