javax.persistence.PersistenceException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 149#33075438
    via GitHub by clacote
    ,
  • Machine vs. Me: August 2012
    via by Unknown author,
  • Duplicate visit bug
    via GitHub by beckyrobbins
    ,
  • OpenUDDI / Mailing Lists
    via by Unknown author,
  • When mapping multiple collections to the root node, an exception results (mapping and exception stack trace is shown below). This works fine if only one collection is mapped to the root node, or if one explicitly specifies unique names for each collection parent node. We are unfortunately restricted by having to use customer-defined XSDs, so this is a show-stopper for us. <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class entity-name="ProcessImpl" table="PROCESSES" node="Process"> <id name="sysID" column="PROCESS_ID" node="sysID" type="string"/> <property name="version" column="PROCESS_VERSION" node="version" type="string"/> <property name="processType" column="PROCESS_TYPE" node="processType" type="string"/> <property name="status" column="PROCESS_STATE" node="status" type="string"/> <property name="createDate" column="PROCESS_CREATE_DATE" node="createDate" type="timestamp"/> <property name="creator" column="PROCESS_CREATOR" node="creator" type="string"/> <property name="transactionNumber" column="PROCESS_TX_NUMBER" node="transactionNumber" type="long"/> <property name="modifiedDate" column="PROCESS_MOD_DATE" node="modifiedDate" type="timestamp"/> <property name="modifier" column="PROCESS_MODIFIER" node="modifier" type="string"/> <property name="title" column="PROCESS_TITLE" node="title" type="string"/> <property name="timer" column="PROCESS_TIMER" node="timer" type="string"/> <property name="currentCSTime" column="PROCESS_CS_TIME" node="currentCSTime" type="timestamp"/> <bag name="requiredActivities" table="REQ_ACTIVITIES" node = "." embed-xml="true" lazy="false" cascade="all"> <key column="PROCESS_ID" not-null="true"/> <element column="REQ_ACTIVITY" type="text" node="requiredActivity"/> </bag> <bag name="retractedGuidelines" table="RET_GUIDELINES" node = "." embed-xml="true" lazy="false" cascade="all"> <key column="PROCESS_ID" not-null="true"/> <element column="RET_GUIDELINE" type="text" node="retractedGuideline"/> </bag> <set name="suspendedGuidelines" node = "." embed-xml="true" lazy="false" cascade="all"> <key column="PROCESS_ID" not-null="true"/> <one-to-many entity-name="SuspendedGuidelineImpl" embed-xml="true" node="suspendedGuideline"/> </set> </class> </hibernate-mapping> Exception stack trace: [6/6/07 22:11:41:246 GMT] 00000012 SystemErr R org.hibernate.HibernateException: Found shared references to a collection: ProcessImpl.retractedGuidelines at org.hibernate.engine.Collections.processReachableCollection(Collections.java:163) at org.hibernate.event.def.FlushVisitor.processCollection(FlushVisitor.java:37) at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:101) at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:61) at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:131) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at com.resonant.persistence.ExternalDataMgrHibernateDom4jImpl.persistHibernateEntity(ExternalDataMgrHibernateDom4jImpl.java:194) at com.resonant.persistence.ExternalDataMgrHibernateDom4jImpl.store(ExternalDataMgrHibernateDom4jImpl.java:172) at com.resonant.persistence.PersistenceHibernateDom4jImpl.storeObject(PersistenceHibernateDom4jImpl.java:215) at com.resonant.persistence.ejb.PersistenceLocalBean.storeObject(PersistenceLocalBean.java:192) at com.resonant.persistence.ejb.EJSLocalStatelessPersistenceLocalEJB_68e55914.storeObject(EJSLocalStatelessPersistenceLocalEJB_68e55914.java:1179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:65) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy2.storeObject(Unknown Source) at com.resonant.hub.processmanager.ProcessHubImpl.startProcess(ProcessHubImpl.java:179) at com.resonant.hub.processmanager.ejb.ProcessHubBean.startProcess(ProcessHubBean.java:138) at com.resonant.hub.processmanager.ejb.EJSRemoteStatelessProcessHubEJB_f45832db.startProcess(EJSRemoteStatelessProcessHubEJB_f45832db.java:208) at com.resonant.hub.processmanager.ejb._EJSRemoteStatelessProcessHubEJB_f45832db_Tie.startProcess(_EJSRemoteStatelessProcessHubEJB_f45832db_Tie.java:261) at com.resonant.hub.processmanager.ejb._EJSRemoteStatelessProcessHubEJB_f45832db_Tie._invoke(_EJSRemoteStatelessProcessHubEJB_f45832db_Tie.java:122) at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613) at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466) at com.ibm.rmi.iiop.ORB.process(ORB.java:503) at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552) at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673) at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551) at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62) at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    via by Andries Schutte,
  • When mapping multiple collections to the root node, an exception results (mapping and exception stack trace is shown below). This works fine if only one collection is mapped to the root node, or if one explicitly specifies unique names for each collection parent node. We are unfortunately restricted by having to use customer-defined XSDs, so this is a show-stopper for us. <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class entity-name="ProcessImpl" table="PROCESSES" node="Process"> <id name="sysID" column="PROCESS_ID" node="sysID" type="string"/> <property name="version" column="PROCESS_VERSION" node="version" type="string"/> <property name="processType" column="PROCESS_TYPE" node="processType" type="string"/> <property name="status" column="PROCESS_STATE" node="status" type="string"/> <property name="createDate" column="PROCESS_CREATE_DATE" node="createDate" type="timestamp"/> <property name="creator" column="PROCESS_CREATOR" node="creator" type="string"/> <property name="transactionNumber" column="PROCESS_TX_NUMBER" node="transactionNumber" type="long"/> <property name="modifiedDate" column="PROCESS_MOD_DATE" node="modifiedDate" type="timestamp"/> <property name="modifier" column="PROCESS_MODIFIER" node="modifier" type="string"/> <property name="title" column="PROCESS_TITLE" node="title" type="string"/> <property name="timer" column="PROCESS_TIMER" node="timer" type="string"/> <property name="currentCSTime" column="PROCESS_CS_TIME" node="currentCSTime" type="timestamp"/> <bag name="requiredActivities" table="REQ_ACTIVITIES" node = "." embed-xml="true" lazy="false" cascade="all"> <key column="PROCESS_ID" not-null="true"/> <element column="REQ_ACTIVITY" type="text" node="requiredActivity"/> </bag> <bag name="retractedGuidelines" table="RET_GUIDELINES" node = "." embed-xml="true" lazy="false" cascade="all"> <key column="PROCESS_ID" not-null="true"/> <element column="RET_GUIDELINE" type="text" node="retractedGuideline"/> </bag> <set name="suspendedGuidelines" node = "." embed-xml="true" lazy="false" cascade="all"> <key column="PROCESS_ID" not-null="true"/> <one-to-many entity-name="SuspendedGuidelineImpl" embed-xml="true" node="suspendedGuideline"/> </set> </class> </hibernate-mapping> Exception stack trace: [6/6/07 22:11:41:246 GMT] 00000012 SystemErr R org.hibernate.HibernateException: Found shared references to a collection: ProcessImpl.retractedGuidelines at org.hibernate.engine.Collections.processReachableCollection(Collections.java:163) at org.hibernate.event.def.FlushVisitor.processCollection(FlushVisitor.java:37) at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:101) at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:61) at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:55) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:131) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at com.resonant.persistence.ExternalDataMgrHibernateDom4jImpl.persistHibernateEntity(ExternalDataMgrHibernateDom4jImpl.java:194) at com.resonant.persistence.ExternalDataMgrHibernateDom4jImpl.store(ExternalDataMgrHibernateDom4jImpl.java:172) at com.resonant.persistence.PersistenceHibernateDom4jImpl.storeObject(PersistenceHibernateDom4jImpl.java:215) at com.resonant.persistence.ejb.PersistenceLocalBean.storeObject(PersistenceLocalBean.java:192) at com.resonant.persistence.ejb.EJSLocalStatelessPersistenceLocalEJB_68e55914.storeObject(EJSLocalStatelessPersistenceLocalEJB_68e55914.java:1179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.ejb.access.LocalSlsbInvokerInterceptor.invoke(LocalSlsbInvokerInterceptor.java:65) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy2.storeObject(Unknown Source) at com.resonant.hub.processmanager.ProcessHubImpl.startProcess(ProcessHubImpl.java:179) at com.resonant.hub.processmanager.ejb.ProcessHubBean.startProcess(ProcessHubBean.java:138) at com.resonant.hub.processmanager.ejb.EJSRemoteStatelessProcessHubEJB_f45832db.startProcess(EJSRemoteStatelessProcessHubEJB_f45832db.java:208) at com.resonant.hub.processmanager.ejb._EJSRemoteStatelessProcessHubEJB_f45832db_Tie.startProcess(_EJSRemoteStatelessProcessHubEJB_f45832db_Tie.java:261) at com.resonant.hub.processmanager.ejb._EJSRemoteStatelessProcessHubEJB_f45832db_Tie._invoke(_EJSRemoteStatelessProcessHubEJB_f45832db_Tie.java:122) at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613) at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466) at com.ibm.rmi.iiop.ORB.process(ORB.java:503) at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552) at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673) at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551) at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62) at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)
    via by Andries Schutte,
    • javax.persistence.PersistenceException: org.hibernate.HibernateException: Found shared references to a collection: com.isweb.app.model.inventory.Invent.inventTransView at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1214) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1147) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1153) at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:798) at org.openxava.jpa.impl.EntityManagerDecorator.flush(EntityManagerDecorator.java:164) at org.openxava.model.impl.JPAPersistenceProvider.flush(JPAPersistenceProvider.java:72) at org.openxava.model.impl.MapFacadeBean.commitTransaction(MapFacadeBean.java:76) at org.openxava.model.impl.MapFacadeBean.setValues(MapFacadeBean.java:196) at org.openxava.model.MapFacade.setValues(MapFacade.java:634) at org.openxava.actions.SaveElementInCollectionAction.saveAggregate(SaveElementInCollectionAction.java:104) at org.openxava.actions.SaveElementInCollectionAction.execute(SaveElementInCollectionAction.java:33) at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:381) at org.openxava.controller.ModuleManager.executeAction(ModuleManager.java:298) at org.openxava.controller.ModuleManager.execute(ModuleManager.java:258) at org.apache.jsp.xava.execute_jsp._jspService(execute_jsp.java:177) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488) at org.openxava.web.servlets.Servlets.getURIAsStream(Servlets.java:66) at org.openxava.web.dwr.Module.getURIAsStream(Module.java:182) at org.openxava.web.dwr.Module.request(Module.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34) at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283) at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Unknown Source) Caused by: org.hibernate.HibernateException: Found shared references to a collection: com.isweb.app.model.inventory.Invent.inventTransView at org.hibernate.engine.Collections.processReachableCollection(Collections.java:185) at org.hibernate.event.def.FlushVisitor.processCollection(FlushVisitor.java:60) at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:122) at org.hibernate.event.def.AbstractVisitor.processValue(AbstractVisitor.java:83) at org.hibernate.event.def.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:77) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:165) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) at org.hibernate.ejb.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:795) ... 50 more

    Users with the same issue

    Unknown visitor1 times, last one,