Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2057

Foreign key exception with share resources

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2
    • Fix Version/s: 2.4
    • Component/s: Tool Share Resources
    • Labels:
      None

      Description

      Server was updated to 2.2 via unix updater:

      137.111.48.174 - tdanes [04/Dec/2008:14:07:25 +1000] "POST /lams/tool/larsrc11/authoring/saveOrUpdateItem.do HTTP/1.1" 200 1155
      137.111.48.174 - tdanes [04/Dec/2008:14:07:28 +1000] "POST /lams/tool/larsrc11/authoring/update.do HTTP/1.1" 200 7958
      137.111.48.174 - tdanes [04/Dec/2008:14:07:28 +1000] "POST /lams/errorpages/error.jsp HTTP/1.1" 200 9476

      2008-12-04 14:07:28,839 [TP-Processor15:] FATAL org.lamsfoundation.lams.web.util.CustomStrutsExceptionHandler - fatal System exception: [org.springframework.dao.DataIntegrityViolationException: Hibernate transaction synchronization: Could not execute JDBC batch update; SQL [delete from tl_larsrc11_resource_item where uid=?]; Cannot delete or update a parent row: a foreign key constraint fails (`lams/tl_larsrc11_item_log`, CONSTRAINT `FK693580A438BF8DFE` FOREIGN KEY (`resource_item_uid`) REFERENCES `tl_larsrc11_resource_item` (`uid`)); nested exception is java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`lams/tl_larsrc11_item_log`, CONSTRAINT `FK693580A438BF8DFE` FOREIGN KEY (`resource_item_uid`) REFERENCES `tl_larsrc11_resource_item` (`uid`))] :Hibernate transaction synchronization: Could not execute JDBC batch update; SQL [delete from tl_larsrc11_resource_item where uid=?]; Cannot delete or update a parent row: a foreign key constraint fails (`lams/tl_larsrc11_item_log`, CONSTRAINT `FK693580A438BF8DFE` FOREIGN KEY (`resource_item_uid`) REFERENCES `tl_larsrc11_resource_item` (`uid`)); nested exception is java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`lams/tl_larsrc11_item_log`, CONSTRAINT `FK693580A438BF8DFE` FOREIGN KEY (`resource_item_uid`) REFERENCES `tl_larsrc11_resource_item` (`uid`))
      org.springframework.dao.DataIntegrityViolationException: Hibernate transaction synchronization: Could not execute JDBC batch update; SQL [delete from tl_larsrc11_resource_item where uid=?]; Cannot delete or update a parent row: a foreign key constraint fails (`lams/tl_larsrc11_item_log`, CONSTRAINT `FK693580A438BF8DFE` FOREIGN KEY (`resource_item_uid`) REFERENCES `tl_larsrc11_resource_item` (`uid`)); nested exception is java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`lams/tl_larsrc11_item_log`, CONSTRAINT `FK693580A438BF8DFE` FOREIGN KEY (`resource_item_uid`) REFERENCES `tl_larsrc11_resource_item` (`uid`))
      java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`lams/tl_larsrc11_item_log`, CONSTRAINT `FK693580A438BF8DFE` FOREIGN KEY (`resource_item_uid`) REFERENCES `tl_larsrc11_resource_item` (`uid`))
              at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647)
              at org.jboss.resource.adapter.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:701)
              at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:57)
              at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:172)
              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:226)
              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
              at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
              at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
              at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:716)
              at org.springframework.orm.hibernate3.SessionFactoryUtils$SpringSessionSynchronization.beforeCommit(SessionFactoryUtils.java:884)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:661)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:486)
              at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:473)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.doCommitTransactionAfterReturning(TransactionAspectSupport.java:267)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
              at $Proxy208.deleteResourceItem(Unknown Source)
              at org.lamsfoundation.lams.tool.rsrc.web.action.AuthoringAction.updateContent(AuthoringAction.java:583)
              at org.lamsfoundation.lams.tool.rsrc.web.action.AuthoringAction.execute(AuthoringAction.java:127)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            ernieg Ernie Ghiglione
            Reporter:
            jundirl Jun-Dir Liew
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development