Closed kwoot closed 6 years ago
Bugzilla Comment ID: 2896 Date: 2011-07-15 12:06:58 From: Manuel Rego Casasnovas \<rego@igalia.com>
ERROR [15-July 11:59:34] [Thread-17] org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.navalplanner.business.labels.entities.Label#1728] at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1759) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2402) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2302) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2602) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:970) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1563) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.navalplanner.business.orders.daos.OrderElementDAO.findWithoutParent(OrderElementDAO.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy90.findWithoutParent(Unknown Source) at org.navalplanner.web.orders.OrderModel.deleteOrderElementWithoutParent(OrderModel.java:674) at org.navalplanner.web.orders.OrderModel.saveOnTransaction(OrderModel.java:578) at org.navalplanner.web.orders.OrderModel.access$0(OrderModel.java:546) at org.navalplanner.web.orders.OrderModel$1.execute(OrderModel.java:494) at org.navalplanner.web.orders.OrderModel$1.execute(OrderModel.java:1) at org.navalplanner.business.common.AdHocTransactionService.runOnTransaction(AdHocTransactionService.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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 $Proxy41.runOnTransaction(Unknown Source) at org.navalplanner.web.orders.OrderModel.save(OrderModel.java:491) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) at org.navalplanner.web.common.concurrentdetection.ConcurrentModificationHandling.whenConcurrentModification(ConcurrentModificationHandling.java:100) at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:160) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy139.save(Unknown Source) at org.navalplanner.web.orders.OrderCRUDController.save(OrderCRUDController.java:734) at org.navalplanner.web.orders.OrderCRUDController.saveAndContinue(OrderCRUDController.java:639) at org.navalplanner.web.orders.OrderCRUDController.saveAndContinue(OrderCRUDController.java:630) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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:134) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:847) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:185) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:140) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:517) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:444) INFO [15-July 11:59:34] [Thread-17] org.navalplanner.business.hibernate.notification.HibernateDatabaseModificationsListener - transaction completed with status: 4 INFO [15-July 11:59:34] [Thread-17] org.navalplanner.web.common.concurrentdetection.ConcurrentModificationController - an OptimistLockingFailureException caused a disruption to an user org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [org.navalplanner.business.labels.entities.Label] with identifier [1728]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.navalplanner.business.labels.entities.Label#1728] at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:669) 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 $Proxy90.findWithoutParent(Unknown Source) at org.navalplanner.web.orders.OrderModel.deleteOrderElementWithoutParent(OrderModel.java:674) at org.navalplanner.web.orders.OrderModel.saveOnTransaction(OrderModel.java:578) at org.navalplanner.web.orders.OrderModel.access$0(OrderModel.java:546) at org.navalplanner.web.orders.OrderModel$1.execute(OrderModel.java:494) at org.navalplanner.web.orders.OrderModel$1.execute(OrderModel.java:1) at org.navalplanner.business.common.AdHocTransactionService.runOnTransaction(AdHocTransactionService.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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 $Proxy41.runOnTransaction(Unknown Source) at org.navalplanner.web.orders.OrderModel.save(OrderModel.java:491) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) at org.navalplanner.web.common.concurrentdetection.ConcurrentModificationHandling.whenConcurrentModification(ConcurrentModificationHandling.java:100) at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:160) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy139.save(Unknown Source) at org.navalplanner.web.orders.OrderCRUDController.save(OrderCRUDController.java:734) at org.navalplanner.web.orders.OrderCRUDController.saveAndContinue(OrderCRUDController.java:639) at org.navalplanner.web.orders.OrderCRUDController.saveAndContinue(OrderCRUDController.java:630) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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:134) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:847) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:185) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:140) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:517) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:444) Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.navalplanner.business.labels.entities.Label#1728] at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1759) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2402) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2302) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2602) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:970) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1563) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.navalplanner.business.orders.daos.OrderElementDAO.findWithoutParent(OrderElementDAO.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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) ... 63 more Jul 15, 2011 11:59:34 AM org.zkoss.zk.ui.impl.UiEngineImpl handleError:1253 SEVERE: >>org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [org.navalplanner.business.labels.entities.Label] with identifier [1728]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.navalplanner.business.labels.entities.Label#1728]
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.navalplanner.business.labels.entities.Label#1728] at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1759) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2402) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2302) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2602) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96) ... ERROR [15-July 11:59:34] [1118774350@qtp-1014537571-16] org.navalplanner.web.error.PageForErrorOnEvent - Object of class [org.navalplanner.business.labels.entities.Label] with identifier [1728]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.navalplanner.business.labels.entities.Label#1728] org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [org.navalplanner.business.labels.entities.Label] with identifier [1728]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.navalplanner.business.labels.entities.Label#1728] at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:669) 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 $Proxy90.findWithoutParent(Unknown Source) at org.navalplanner.web.orders.OrderModel.deleteOrderElementWithoutParent(OrderModel.java:674) at org.navalplanner.web.orders.OrderModel.saveOnTransaction(OrderModel.java:578) at org.navalplanner.web.orders.OrderModel.access$0(OrderModel.java:546) at org.navalplanner.web.orders.OrderModel$1.execute(OrderModel.java:494) at org.navalplanner.web.orders.OrderModel$1.execute(OrderModel.java:1) at org.navalplanner.business.common.AdHocTransactionService.runOnTransaction(AdHocTransactionService.java:111) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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 $Proxy41.runOnTransaction(Unknown Source) at org.navalplanner.web.orders.OrderModel.save(OrderModel.java:491) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88) at org.navalplanner.web.common.concurrentdetection.ConcurrentModificationHandling.whenConcurrentModification(ConcurrentModificationHandling.java:100) at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:160) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy139.save(Unknown Source) at org.navalplanner.web.orders.OrderCRUDController.save(OrderCRUDController.java:734) at org.navalplanner.web.orders.OrderCRUDController.saveAndContinue(OrderCRUDController.java:639) at org.navalplanner.web.orders.OrderCRUDController.saveAndContinue(OrderCRUDController.java:630) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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:134) at org.zkoss.zk.scripting.util.GenericInterpreter.interpret(GenericInterpreter.java:341) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:847) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:185) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:140) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.process0(EventProcessingThreadImpl.java:517) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:444) Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.navalplanner.business.labels.entities.Label#1728] at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1759) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2402) at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2302) at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2602) at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:96) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:168) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:41) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:970) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1563) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283) at org.navalplanner.business.orders.daos.OrderElementDAO.findWithoutParent(OrderElementDAO.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) 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) ... 63 more
Bugzilla Comment ID: 2897 Date: 2011-07-15 13:31:38 From: Manuel Rego Casasnovas \<rego@igalia.com>
The problem is that if have the same label assigned to 2 projects. Then if you open both projects and save in one, when you save in the other you're going to get an error.
Mapping is wrong in Orders.hbm.xml:
<!-- Assess many-to-many bidireccional -->
<set name="labels" table="order_element_label" cascade="save-update">
<key column="order_element_id" not-null="true"/>
<many-to-many column="label_id" class="org.navalplanner.business.labels.entities.Label"/>
</set>
This has save-update in order to allow create new labels from WBS. We should modify IAssignedLabelsModel::createLabel in order to save the new label once it's created and independently of saving or not the order.
Bugzilla Comment ID: 2900 Date: 2011-07-15 15:26:36 From: Oscar González \<ogonzalez@igalia.com>
commit 11bdceedc532368e20c4b7bf520b4cd1744c5011 Author: Manuel Rego Casasnovas rego@igalia.com Date: Fri Jul 15 14:05:28 2011 +0200
[Bug #1108] Fix bug
There shouldn't be cascade from order element to labels because labels
are shared among orders. Due to this OptimistLockingExceptions were
being caused. Now the newly created label is explicitly saved instead
of relaying in the cascading behavior.
FEA: ItEr75S04BugFixing
Bugzilla Comment ID: 2901 Date: 2011-07-15 15:28:57 From: Oscar González \<ogonzalez@igalia.com>
The problem with the attached path was that the modified method was overriden by AssignedLabelsToOrderElementModel
Bugzilla Comment ID: 2905 Date: 2011-07-18 20:01:15 From: Manuel Rego Casasnovas \<rego@igalia.com>
commit a47f9330fd9d238d8d57d6180ea93e93f1378951 Author: Manuel Rego Casasnovas rego@igalia.com Date: Fri Jul 15 17:59:50 2011 +0200
[Bug #1108] Fixed problem if label is created by another user
Resolved an issue when the label is created by another user, and you try
to create it again while editing the order.
FEA: ItEr75S04BugFixing
Bugzilla Comment ID: 2898 Date: 2011-07-15 14:06:24 From: Manuel Rego Casasnovas \<rego@igalia.com>
Attached file: 0001-WIP.patch File description: WIP Patch (not ready yet)
(Original Bugzilla Bug ID: 1108)
Date: 2011-07-15 12:06:58 From: Manuel Rego Casasnovas \<rego@igalia.com> To: Oscar González \<ogonzalez@igalia.com> Version: navalplan-1.1 (1.1.x) Last updated: 2011-07-18 20:01:15
(Note: this issue was migrated automatically with bugzilla2github.py tool )