0 Replies Latest reply on Mar 9, 2006 10:58 AM by Louis Coetzee

    Entity delete problem

    Louis Coetzee Apprentice

      Hi,

      I am trying to delete an entity from a collection. For some reason I get the following error:

      Illegal attempt to associate a collection with two open sessions
      .

      I have browsed the Hibernate, this EJB3 mailing list as well as Googled, but have not found anything helpful.


      How can I find out which sessions are open ? I am running a Seam application with an Entity Manager injected with :

      @In(create = true, value = "napEntityManager")
       EntityManager em;


      I have Entities in my stateful bean that were created elsewhere (in another stateful bean) using
      @PersistenceContext(type=PersistenceContextType.EXTENDED)
       private EntityManager em;

      which is injected by Seam e.g:

      @In(required = false, scope=ScopeType.SESSION)
       private PortalUser portalUser;


      Could that be the second session that is open ?
      Any suggestions to trace this would be appreciated.

      Thanks

      Louis