Closed kwoot closed 6 years ago
Bugzilla Comment ID: 861 Date: 2010-03-02 20:40:19 From: Javier Morán \<jmoran@igalia.com>
It must not be allowed to delete an order element with work reports and an informative message must be given to the user.
org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3700] [SQL: 0, 23503] org.postgresql.util.PSQLException: ERROR: update o delete en una tabla "orderelement" viola la restriccion de clave foranea "fkeb02c3f1efda874f" en la tabla "work_report_line" Detail: La llave (id)=(3700) todavía es referida desde la tabla «work_report_line». 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) ... 2299354 [366254718@qtp-1783035748-17] ERROR org.navalplanner.web.error.PageForErrorOnEvent - could not delete: [org.navalplanner.business.orders.entities.OrderLine#3700]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3700][SQL: 0, 23503] org.springframework.dao.DataIntegrityViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3700]; nested exception is org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3700] 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 $Proxy101.save(Unknown Source) at org.navalplanner.web.orders.OrderCRUDController.save(OrderCRUDController.java:501) at org.navalplanner.web.orders.OrderCRUDController.saveAndContinue(OrderCRUDController.java:448) 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:787) 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:493) at org.zkoss.zk.ui.impl.EventProcessingThreadImpl.run(EventProcessingThreadImpl.java:425) Caused by: org.hibernate.exception.ConstraintViolationException: could not delete: [org.navalplanner.business.orders.entities.OrderLine#3700] 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) ... 28 more Caused by: org.postgresql.util.PSQLException: ERROR: update o delete en una tabla "orderelement" viola la restriccion de clave foranea "fkeb02c3f1efda874f" en la tabla "work_report_line" Detail: La llave (id)=(3700) todavía es referida desde la tabla «work_report_line». 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) ... 39 more
Bugzilla Comment ID: 864 Date: 2010-03-03 13:11:27 From: Manuel Rego Casasnovas \<rego@igalia.com>
commit e6ba1ff189b7646508153d1eff1b15b2315afc59 Author: Manuel Rego Casasnovas mrego@igalia.com Date: Wed Mar 3 13:09:56 2010 +0100
ItEr49S04ValidacionEProbasFuncionaisItEr48S04: [Bug #368] Fixed bug. Added method "isAlreadyInUseThisOrAnyOfItsChildren" at OrderElementDAO.
(Original Bugzilla Bug ID: 368)
Date: 2010-03-02 20:40:19 From: Javier Morán \<jmoran@igalia.com> To: Manuel Rego Casasnovas \<rego@igalia.com> Version: navalplan-1.0 (1.0.x) Last updated: 2011-01-18 17:51:11
(Note: this issue was migrated automatically with bugzilla2github.py tool )