Closed kwoot closed 6 years ago
Bugzilla Comment ID: 1776 Date: 2010-11-16 13:03:06 From: Jacobo Aragunde Perez \<jaragunde@igalia.com>
Use the same dump contained in bug #719. Follow these steps to reproduce the bug:
3267060 [79959314@qtp-337565612-14] ERROR org.navalplanner.web.error.PageForErrorOnEvent - could not delete: [org.navalplanner.business.orders.entities.OrderLine#3222]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3222][SQL: 0, 23503] org.springframework.dao.DataIntegrityViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3222]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3222] at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:636) at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:789) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:663) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy70.runOnTransaction(Unknown Source) at org.navalplanner.web.orders.OrderModel.save(OrderModel.java:484) at sun.reflect.GeneratedMethodAccessor619.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.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at $Proxy131.save(Unknown Source) at org.navalplanner.web.orders.OrderCRUDController.save(OrderCRUDController.java:634) at org.navalplanner.web.orders.OrderCRUDController.saveAndContinue(OrderCRUDController.java:549) at sun.reflect.GeneratedMethodAccessor613.invoke(Unknown Source) 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: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.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3222] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2536) at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2692) at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:77) 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:172) 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.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655) ... 34 more Caused by: org.postgresql.util.PSQLException: ERROR: update o delete en «orderelement» viola la clave foránea «fkab89a5edefda874f» en la tabla «schedulingdataforversion» Detail: La llave (id)=(3222) todavía es referida desde la tabla «schedulingdataforversion». at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:350) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:304) at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:2518) ... 45 more
Bugzilla Comment ID: 1777 Date: 2010-11-16 13:05:03 From: Jacobo Aragunde Perez \<jaragunde@igalia.com>
It seems to have something to do with the scenarios data structures, because of this:
Caused by: org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3222] ... Caused by: org.postgresql.util.PSQLException: ERROR: update o delete en «orderelement» viola la clave foránea «fkab89a5edefda874f» en la tabla «schedulingdataforversion»
Bugzilla Comment ID: 1798 Date: 2010-11-17 14:02:47 From: Jacobo Aragunde Perez \<jaragunde@igalia.com>
In fact, with the specified dump, the bug can be reproducing only removing the order element 'asdflkaj' and saving. So these steps don't reproduce the bug.
The cause of the exception is the same that was explained in the comment 3 of bug #722 (http://bugs.navalplan.org/show_bug.cgi?id=722#c3). And since the cause is the same, it seems that we are talking about the same bug, so I'm closing this one as duplicated.
(Original Bugzilla Bug ID: 721)
Date: 2010-11-16 13:03:06 From: Jacobo Aragunde Perez \<jaragunde@igalia.com> To: Jacobo Aragunde Perez \<jaragunde@igalia.com> Version: navalplan-1.0 (1.0.x) Last updated: 2011-01-18 17:51:34
(Note: this issue was migrated automatically with bugzilla2github.py tool )