org.springframework.orm.jpa.JpaSystemException: org.hibernate.HibernateException: c; nested exception is javax.persistence.PersistenceException: org.hibernate.HibernateException: illegally attempted to associate a proxy with two open Sessions

Stack Overflow | Developer | 2 months ago
  1. 0

    Hibernate- illegally attempted to associate a proxy with two open Sessions on creating a new Entity Object

    Stack Overflow | 2 months ago | Developer
    org.springframework.orm.jpa.JpaSystemException: org.hibernate.HibernateException: c; nested exception is javax.persistence.PersistenceException: org.hibernate.HibernateException: illegally attempted to associate a proxy with two open Sessions
  2. 0

    spring -> org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions

    Stack Overflow | 2 years ago | Kleber Mota
    org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions
  3. 0

    org.hibernate.HibernateException: illegally attempted to associate a proxy with two open Sessions

    Stack Overflow | 2 years ago | user3808750
    org.hibernate.HibernateException: illegally attempted to associate a proxy with two open Sessions
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to cacche Hibernate persistance objects

    Stack Overflow | 3 years ago
    org.hibernate.HibernateException: illegally attempted to associate a proxy with two open Sessions
  6. 0

    Hibernate exception on open sessions. How can I debug this?

    Stack Overflow | 5 years ago | Cratylus
    org.hibernate.HibernateException: illegally attempted to associate a proxy with two open Sessions

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.HibernateException

      illegally attempted to associate a proxy with two open Sessions

      at org.hibernate.proxy.AbstractLazyInitializer.setSession()
    2. Hibernate
      AbstractSaveEventListener.saveWithGeneratedId
      1. org.hibernate.proxy.AbstractLazyInitializer.setSession(AbstractLazyInitializer.java:112)
      2. org.hibernate.engine.internal.StatefulPersistenceContext.reassociateProxy(StatefulPersistenceContext.java:585)
      3. org.hibernate.engine.internal.StatefulPersistenceContext.reassociateIfUninitializedProxy(StatefulPersistenceContext.java:545)
      4. org.hibernate.event.internal.ProxyVisitor.processEntity(ProxyVisitor.java:49)
      5. org.hibernate.event.internal.AbstractVisitor.processValue(AbstractVisitor.java:124)
      6. org.hibernate.event.internal.WrapVisitor.processValue(WrapVisitor.java:125)
      7. org.hibernate.event.internal.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:76)
      8. org.hibernate.event.internal.AbstractSaveEventListener.visitCollectionsBeforeSave(AbstractSaveEventListener.java:377)
      9. org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:279)
      10. org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:195)
      11. org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:128)
      11 frames
    3. Hibernate EJB
      EJB3PersistEventListener.saveWithGeneratedId
      1. org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:78)
      1 frame
    4. Hibernate
      SessionImpl.persist
      1. org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:208)
      2. org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:151)
      3. org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:78)
      4. org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:725)
      5. org.hibernate.internal.SessionImpl.persist(SessionImpl.java:701)
      6. org.hibernate.internal.SessionImpl.persist(SessionImpl.java:705)
      6 frames
    5. Hibernate EJB
      AbstractEntityManagerImpl.persist
      1. org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:853)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    7. Spring ORM
      ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke
      1. org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:344)
      1 frame
    8. com.sun.proxy
      $Proxy55.persist
      1. com.sun.proxy.$Proxy55.persist(Unknown Source)
      1 frame
    9. net.nationalpayment.cp20
      CreateEntityUtilityImpl.createTransaction
      1. net.nationalpayment.cp20.scheduler.CreateEntityUtilityImpl.createTransaction(CreateEntityUtilityImpl.java:123)
      1 frame
    10. net.nationalpayment.core
      ProcessEnrollmentImpl.run
      1. net.nationalpayment.core.scheduler.ProcessMiscSchedule.processMisc(ProcessMiscSchedule.java:153)
      2. net.nationalpayment.core.scheduler.ProcessDraftSchedule.processDraft(ProcessDraftSchedule.java:287)
      3. net.nationalpayment.core.scheduler.ProcessEnrollmentImpl.processEnrollment(ProcessEnrollmentImpl.java:154)
      4. net.nationalpayment.core.scheduler.ProcessEnrollmentImpl.run(ProcessEnrollmentImpl.java:81)
      4 frames
    11. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames