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 | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

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

    Stack Overflow | 6 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

    Remote procedure call error

    GitHub | 3 years ago | paxanga
    org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:97) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:67) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:170) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:77) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2276) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2272) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1741) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:57) INFO | jvm 1 | 2013/10/31 01:47:16 | at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) INFO | jvm 1 | 2013/10/31 01:47:16 | at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.traccar.web.server.model.DataServiceImpl.init(DataServiceImpl.java:66) INFO | jvm 1 | 2013/10/31 01:47:16 | at javax.servlet.GenericServlet.init(GenericServlet.java:244) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:534) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:417) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:659) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.Server.handle(Server.java:370) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) INFO | jvm 1 | 2013/10/31 01:47:16 | at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Illegal attempt to associate a collection with two open sessions - Spring Forum

    spring.io | 2 years ago
    org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions at org.hibernate.collection.AbstractPersistentCollect ion.setCurrentSession(AbstractPersistentCollection .java:237) at org.hibernate.event.def.OnUpdateVisitor.processCol lection(OnUpdateVisitor.java:41) at org.hibernate.event.def.AbstractVisitor.processVal ue(AbstractVisitor.java:104) at org.hibernate.event.def.AbstractVisitor.processVal ue(AbstractVisitor.java:64) at org.hibernate.event.def.AbstractVisitor.processEnt ityPropertyValues(AbstractVisitor.java:58) at org.hibernate.event.def.AbstractVisitor.process(Ab stractVisitor.java:129) at org.hibernate.event.def.DefaultDeleteEventListener .onDelete(DefaultDeleteEventListener.java:74) at org.hibernate.impl.SessionImpl.delete(SessionImpl. java:579) at org.springframework.orm.hibernate3.HibernateTempla te$26.doInHibernate(HibernateTemplate.java:703) at org.springframework.orm.hibernate3.HibernateTempla te.execute(HibernateTemplate.java:312) at org.springframework.orm.hibernate3.HibernateTempla te.deleteAll(HibernateTemplate.java:699) at org.tiaa.secarchive.dao.impl.SecProductionCltDAOIm pl.deleteSourceData(SecProductionCltDAOImpl.java:7 6) at org.tiaa.secarchive.delegate.impl.SecArchiveDelega teImpl.archive(SecArchiveDelegateImpl.java:86) at org.tiaa.secarchive.schedule.impl.JobImpl.archive( JobImpl.java:328) at org.tiaa.secarchive.schedule.impl.JobImpl.execute( JobImpl.java:210) at org.tiaa.secarchive.schedule.impl.DaemonImpl.run(D aemonImpl.java:239)
  6. 0

    Re: Apache ODE 1.3.6 on Oracle DB with Hibernate 3.2.0

    ode-user | 3 years ago | Sathwik B P
    org.hibernate.HibernateException: CGLIB Enhancement failed: > org.apache.ode.daohib.bpel.hobj.HMessage > at > org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl. > java:478) > at > org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl. > java:450) > at > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleSche > duler.java:523) > at > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob$1.call(SimpleSche > duler.java:517) > at > org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleSc > heduler.java:289) > at > org.apache.ode.scheduler.simple.SimpleScheduler.execTransaction(SimpleSc > heduler.java:244) > at > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleSchedu > ler.java:517) > at > org.apache.ode.scheduler.simple.SimpleScheduler$RunJob.call(SimpleSchedu > ler.java:501) > at > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138)

    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