Closed kwoot closed 6 years ago
Bugzilla Comment ID: 3439 Date: 2011-12-02 11:11:06 From: Diego Pino \<dpino@igalia.com>
How to reproduce:
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [org.libreplan.business.orders.entities.OrderElement] with identifier [9213]: optimistic locking failed; nested exception is org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.libreplan.business.orders.entities.OrderElement#9213] 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 $Proxy94.checkVersion(Unknown Source) at org.libreplan.web.orders.ManageOrderElementAdvancesModel.confirmSave(ManageOrderElementAdvancesModel.java:419) at sun.reflect.GeneratedMethodAccessor853.invoke(Unknown Source) 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 $Proxy273.confirmSave(Unknown Source) at org.libreplan.web.orders.ManageOrderElementAdvancesController.save(ManageOrderElementAdvancesController.java:137) at org.libreplan.web.orders.ManageOrderElementAdvancesController.close(ManageOrderElementAdvancesController.java:122) at org.libreplan.web.orders.OrderElementController.validateProgressTab(OrderElementController.java:280) at org.libreplan.web.orders.OrderElementController.validateTabs(OrderElementController.java:251) at org.libreplan.web.orders.OrderElementController.close(OrderElementController.java:244) at org.libreplan.web.orders.OrderElementController.close(OrderElementController.java:292) 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:876) at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:180) at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:138) 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.libreplan.business.orders.entities.OrderElement#9213] at org.libreplan.business.common.daos.GenericDAOHibernate.checkVersion(GenericDAOHibernate.java:160) at org.libreplan.business.common.daos.GenericDAOHibernate.checkVersion(GenericDAOHibernate.java:61) at sun.reflect.GeneratedMethodAccessor854.invoke(Unknown Source) 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) ... 39 more
Bugzilla Comment ID: 3440 Date: 2011-12-02 11:22:23 From: Diego Pino \<dpino@igalia.com>
The steps commented before are not enough to reproduce the bug. The bug happens when two users are editing the same Order, one is saved and the other (outdated order) opens an orderelement and closes the orderelement edit window with X.
How to reproduce:
Optimistic Locking Exception is launched.
Bugzilla Comment ID: 3774 Date: 2012-02-20 11:33:44 From: Manuel Rego Casasnovas \<rego@igalia.com>
commit 7cb0958e9830999a0eddc28070bcee16e1ca0f09 Author: Manuel Rego Casasnovas rego@igalia.com Date: Mon Feb 20 12:25:19 2012 +0100
Bug #1281: Remove unneeded checkVersion when editing progresses
FEA: ItEr76S04BugFixing
(Original Bugzilla Bug ID: 1281)
Date: 2011-12-02 11:11:06 From: Diego Pino \<dpino@igalia.com> To: Manuel Rego Casasnovas \<rego@igalia.com> Version: libreplan-1.2 (1.2.x) Last updated: 2012-02-20 11:33:44
(Note: this issue was migrated automatically with bugzilla2github.py tool )