Closed kwoot closed 6 years ago
Bugzilla Comment ID: 2726 Date: 2011-05-06 19:09:31 From: Javier Morán \<jmoran@igalia.com>
If you open the limiting resource managament and you save meanwhile one of the projects which have any of the tasks of the limiting resource management window, on saving the limiting resource management window you get the concurrency exception:
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Object of class [org.navalplanner.business.planner.limiting.entities.LimitingResourceQueueElement] with identifier [48179]: 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.planner.limiting.entities.LimitingResourceQueueElement#48179] 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 $Proxy76.flush(Unknown Source) at org.navalplanner.web.limitingresources.LimitingResourceQueueModel.saveQueueElement(LimitingResourceQueueModel.java:942) at org.navalplanner.web.limitingresources.LimitingResourceQueueModel.saveQueueElements(LimitingResourceQueueModel.java:919) at org.navalplanner.web.limitingresources.LimitingResourceQueueModel.applyChanges(LimitingResourceQueueModel.java:913) at org.navalplanner.web.limitingresources.LimitingResourceQueueModel.confirm(LimitingResourceQueueModel.java:908) 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 $Proxy136.confirm(Unknown Source) at org.navalplanner.web.limitingresources.LimitingResourcesController.saveQueues(LimitingResourcesController.java:323) 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:797) 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:519) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:446) Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.navalplanner.business.planner.limiting.entities.LimitingResourceQueueElement#48179] 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.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001) at org.navalplanner.business.common.daos.GenericDAOHibernate.flush(GenericDAOHibernate.java:209) 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.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138) ... 38 more
Bugzilla Comment ID: 2746 Date: 2011-05-10 20:33:17 From: Susana \<smpedreira@gmail.com>
commit c5de10fa0ed8f2f9a1f631328f22f269ecf2b93f
[Bug #1061] it marks LimitingResourceQueueModel with @OnConcurrentModification to intercept an OptimisticLockingFailureException.
FEA: ItEr74S04BugFixing
(Original Bugzilla Bug ID: 1061)
Date: 2011-05-06 19:09:31 From: Javier Morán \<jmoran@igalia.com> To: Susana \<smpedreira@gmail.com> Version: navalplan-1.1 (1.1.x) Last updated: 2011-05-10 20:33:17
(Note: this issue was migrated automatically with bugzilla2github.py tool )