# HibernateException: Found shared references to a collection:

**URL:** <https://discourse.hibernate.org/t/hibernateexception-found-shared-references-to-a-collection/11162>\
**Category:** Hibernate ORM\
**Created:** [March 6, 2025, 10:59am UTC](https://discourse.hibernate.org/t/hibernateexception-found-shared-references-to-a-collection/11162 "2025-03-06T10:59:08Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [March 12, 2025, 2:49pm UTC](https://discourse.hibernate.org/t/hibernateexception-found-shared-references-to-a-collection/11162/7 "2025-03-12T14:49:17Z")

</div>

Your stack trace shows that you’re doing something which is forbidden i.e. interact with the `EntityManager` in a lifecycle callback. Also see this thread: [Data lost when any query executed in EntityListener - #4 by beikov](https://discourse.hibernate.org/t/data-lost-when-any-query-executed-in-entitylistener/11170/4)

---

_[View the full topic](https://discourse.hibernate.org/t/hibernateexception-found-shared-references-to-a-collection/11162)._
