Closed kwoot closed 6 years ago
Bugzilla Comment ID: 1212 Date: 2010-06-15 13:56:31 From: Javier Morán \<jmoran@igalia.com>
If do the following movements in the attached dump you get an exception:
GRAVE: >>org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.planner.entities.GenericDayAssignment; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.planner.entities.GenericDayAssignment
org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.planner.entities.GenericDayAssignment at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:219) at org.hibernate.collection.AbstractPersistentCollection.getOrphans(AbstractPersistentCollection.java:897) at org.hibernate.collection.PersistentSet.getOrphans(PersistentSet.java:90) at org.hibernate.engine.CollectionEntry.getOrphans(CollectionEntry.java:350) at org.hibernate.engine.Cascade.deleteOrphans(Cascade.java:341) ... 3130000 [2098925220@qtp-1684172754-22] ERROR org.navalplanner.web.error.PageForErrorOnEvent - object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.planner.entities.GenericDayAssignment; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.planner.entities.GenericDayAssignment org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.planner.entities.GenericDayAssignment; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.planner.entities.GenericDayAssignment at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:651) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.convertHibernateAccessException(AbstractSessionFactoryBean.java:303) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.translateExceptionIfPossible(AbstractSessionFactoryBean.java:282) at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:62) at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:212) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:146) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy75.save(Unknown Source) at org.navalplanner.web.limitingresources.LimitingResourceQueueModel.saveQueueElement(LimitingResourceQueueModel.java:540) at org.navalplanner.web.limitingresources.LimitingResourceQueueModel.saveQueueElements(LimitingResourceQueueModel.java:533) at org.navalplanner.web.limitingresources.LimitingResourceQueueModel.applyChanges(LimitingResourceQueueModel.java:527) at org.navalplanner.web.limitingresources.LimitingResourceQueueModel.confirm(LimitingResourceQueueModel.java:522) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy134.confirm(Unknown Source) at org.navalplanner.web.limitingresources.LimitingResourcesController.saveQueues(LimitingResourcesController.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at bsh.Reflect.invokeMethod(Unknown Source) at bsh.Reflect.invokeObjectMethod(Unknown Source) at bsh.Name.invokeMethod(Unknown Source) at bsh.BSHMethodInvocation.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.BSHPrimaryExpression.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at bsh.Interpreter.eval(Unknown Source) at org.zkoss.zk.scripting.bsh.BSHInterpreter.exec(BSHInterpreter.java:119) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:310) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:787) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:176) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:141) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:493) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:425) Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.navalplanner.business.planner.entities.GenericDayAssignment at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:219) at org.hibernate.collection.AbstractPersistentCollection.getOrphans(AbstractPersistentCollection.java:897) at org.hibernate.collection.PersistentSet.getOrphans(PersistentSet.java:90) at org.hibernate.engine.CollectionEntry.getOrphans(CollectionEntry.java:350) at org.hibernate.engine.Cascade.deleteOrphans(Cascade.java:341) at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:325) at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:243) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:220) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:170) at org.hibernate.engine.Cascade.cascade(Cascade.java:131) at org.hibernate.engine.Cascade.cascade(Cascade.java:98) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java:357) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:329) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:223) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:89) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:508) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:500) at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:218) at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:269) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:217) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:170) at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:297) at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:243) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:220) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:170) at org.hibernate.engine.Cascade.cascade(Cascade.java:131) at org.hibernate.engine.Cascade.cascade(Cascade.java:98) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java:357) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:329) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:223) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:89) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:508) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:500) at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:218) at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:269) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:217) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:170) at org.hibernate.engine.Cascade.cascade(Cascade.java:131) at org.hibernate.engine.Cascade.cascade(Cascade.java:98) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java:357) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:329) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:223) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:89) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70) at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:508) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:500) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:496) at org.navalplanner.business.common.daos.GenericDAOHibernate.save(GenericDAOHibernate.java:93) at org.navalplanner.business.common.daos.GenericDAOHibernate.save(GenericDAOHibernate.java:1) at sun.reflect.GeneratedMethodAccessor434.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138) ... 38 more
Bugzilla Comment ID: 1230 Date: 2010-06-15 18:46:11 From: Javier Morán \<jmoran@igalia.com>
It does not happens always. It is not completely deterministic.
Bugzilla Comment ID: 1265 Date: 2010-06-22 09:57:14 From: Oscar González \<ogonzalez@igalia.com>
I think it's a duplicated of bug 527. It's due to not calling dontPoseAsTransientAnymore
Bugzilla Comment ID: 1213 Date: 2010-06-15 13:57:04 From: Javier Morán \<jmoran@igalia.com>
Attached file: dump.sql File description: database dump.
(Original Bugzilla Bug ID: 524)
Date: 2010-06-15 13:56:31 From: Javier Morán \<jmoran@igalia.com> To: Oscar González \<ogonzalez@igalia.com> Version: navalplan-1.0 (1.0.x) Last updated: 2011-01-18 17:52:15
(Note: this issue was migrated automatically with bugzilla2github.py tool )