This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
So when i am saving a voyage everything goes well however when i added a <set name="dailyCargo" inverse="true" order-by="REP_NO"> <key column="LINEUP_NO"></key> <one-to-many class="DailyCargo"/> </set> it started giving me this exception
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
Can you post your code and also mappings of the related class too, and also use the CODE button below to put your mappings and code in between those two tags so that your formatting of indentations remain, without indentation the stuff is very hard to read.
In your code, do you have two Sessions open? If so, close the first one before starting the second.
In your related class mapping, I am assuming you have the inverse Many-To-One, correct?