LibrePlan / libreplan

LibrePlan - Open Web Planning
https://www.libreplan.dev
GNU Affero General Public License v3.0
289 stars 170 forks source link

Trying to store order tree launches exception #861

Closed kwoot closed 6 years ago

kwoot commented 13 years ago

(Original Bugzilla Bug ID: 717)

Date: 2010-11-15 16:00:58 From: Xavi Castaño \<xcastanho@igalia.com> To: Jacobo Aragunde Perez \<jaragunde@igalia.com> Version: navalplan-1.0 (1.0.x) Last updated: 2011-01-18 17:52:59


(Note: this issue was migrated automatically with bugzilla2github.py tool )

kwoot commented 6 years ago

Bugzilla Comment ID: 1765 Date: 2010-11-15 16:00:58 From: Xavi Castaño \<xcastanho@igalia.com>

I received an exception after trying to store a tree with pagination (I am not sure this is caused by pagination):

Run-time error: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389][SQL: 0, 23503] . Error was registered and it will be fixed as soon as possible 10153211 [Thread-21] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 23503 10153211 [Thread-21] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: update or delete on table "orderelement" violates foreign key constraint "fkab89a5edefda874f" on table "schedulingdataforversion" Detail: Key (id)=(2389) is still referenced from table "schedulingdataforversion". 10153254 [Thread-21] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389] 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) 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 $Proxy55.runOnTransaction(Unknown Source) at org.navalplanner.web.orders.OrderModel.save(OrderModel.java:484) 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.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.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.postgresql.util.PSQLException: ERROR: update or delete on table "orderelement" violates foreign key constraint "fkab89a5edefda874f" on table "schedulingdataforversion" Detail: Key (id)=(2389) is still referenced from table "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) ... 47 more 10153281 [Thread-21] INFO org.navalplanner.business.hibernate.notification.HibernateDatabaseModificationsListener - transaction completed with status: 4 15-Nov-2010 15:48:49 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1130 SEVERE: >>org.springframework.dao.DataIntegrityViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389]

org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389] [SQL: 0, 23503] org.postgresql.util.PSQLException: ERROR: update or delete on table "orderelement" violates foreign key constraint "fkab89a5edefda874f" on table "schedulingdataforversion" Detail: Key (id)=(2389) is still referenced from table "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) ... 10153355 [646825558@qtp-1844326056-48] ERROR org.navalplanner.web.error.PageForErrorOnEvent - could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389][SQL: 0, 23503] org.springframework.dao.DataIntegrityViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389] 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 $Proxy55.runOnTransaction(Unknown Source) at org.navalplanner.web.orders.OrderModel.save(OrderModel.java:484) 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.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.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.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#2389] 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) ... 36 more Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "orderelement" violates foreign key constraint "fkab89a5edefda874f" on table "schedulingdataforversion" Detail: Key (id)=(2389) is still referenced from table "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) ... 47 more

kwoot commented 6 years ago

Bugzilla Comment ID: 1774 Date: 2010-11-16 10:55:52 From: Xavi Castaño \<xcastanho@igalia.com>

To reproduce:

kwoot commented 6 years ago

Bugzilla Comment ID: 1814 Date: 2010-11-17 17:36:49 From: Jacobo Aragunde Perez \<jaragunde@igalia.com>