Ask Your Question
2

What does "Illegal attempt to associate a collection with two open sessions" mean in the context of Spring-Hibernate?

asked 2023-06-10 20:30:08 +0000

qstack gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-06-10 20:55:01 +0000

woof gravatar image

This error message means that there is an attempt to associate a collection object with two different Hibernate sessions simultaneously. In the context of Spring-Hibernate integration, this can happen when two different transactions try to access the same collection object at the same time, or when a collection is loaded in one transaction and then passed to another transaction. To fix this issue, ensure that transactions are properly managed and that collections are synchronized with the current Hibernate session.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-10 20:30:08 +0000

Seen: 12 times

Last updated: Jun 10 '23