Continuum
  1. Continuum
  2. CONTINUUM-1743

Provide better error handling if DELETE of project fails

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.3.6
    • Component/s: Database, Web - UI
    • Labels:
      None
    • Environment:
      Linux RedHat

      Description

      It appears that it is not possible to delete a project if it is in a certain state. The error message though is not very helpful:
      javax.jdo.JDOUserException: One or more instances could not be deleted
      NestedThrowables: javax.jdo.JDODataStoreException: Delete request
      failed: DELETE FROM PROJECTDEPENDENCY WHERE PROJECTDEPENDENCY_ID=?
      NestedThrowables: SQL Exception: DELETE on table 'PROJECTDEPENDENCY'
      caused a violation of foreign key constraint 'PROJECT_FK2' for key (40580). The statement has been rolled back.

      We had a process that seemed to be stuck. We tried then to delete the project but this only caused the error message above. I believe that Continuum could not delete the project because it was in a state that does not allow deleting it. If this is the case I would like to suggest to provide a better error handling letting the user know why the delete failed.

      We finally could delete the project after we restarted Continnum (not sure if this was necessary, but that is what we did) and then building the project again. This time it went through and after the build was successful, we could delete the project.

        Issue Links

          Activity

          Andreas Guther created issue -
          Brett Porter made changes -
          Field Original Value New Value
          Fix Version/s 1.x [ 14167 ]
          Wendy Smoak made changes -
          Fix Version/s 1.x [ 14167 ]
          Fix Version/s Future [ 13292 ]
          Brett Porter made changes -
          Fix Version/s Future [ 13292 ]
          Wendy Smoak made changes -
          Fix Version/s Reviewed [ 15656 ]
          Hide
          Brett Porter added a comment -

          Here is the full trace when it occurs:

          ERROR 23503: DELETE on table 'PROJECTDEPENDENCY' caused a violation of foreign key constraint 'PROJECT_FK2' for key (3024679).  The statement has been rolled back.
          	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
          	at org.apache.derby.impl.sql.execute.ReferencedKeyRIChecker.doCheck(Unknown Source)
          	at org.apache.derby.impl.sql.execute.RISetChecker.doPKCheck(Unknown Source)
          	at org.apache.derby.impl.sql.execute.DeleteResultSet.collectAffectedRows(Unknown Source)
          	at org.apache.derby.impl.sql.execute.DeleteResultSet.open(Unknown Source)
          	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
          	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
          	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
          	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source)
          	at org.jpox.store.rdbms.RDBMSManager.executeStatementUpdate(RDBMSManager.java:575)
          	at org.jpox.store.rdbms.request.DeleteRequest.execute(DeleteRequest.java:274)
          	at org.jpox.store.rdbms.table.ClassTable.delete(ClassTable.java:2611)
          	at org.jpox.store.StoreManager.delete(StoreManager.java:1025)
          	at org.jpox.state.StateManagerImpl.internalDeletePersistent(StateManagerImpl.java:4468)
          	at org.jpox.state.StateManagerImpl.deletePersistent(StateManagerImpl.java:4423)
          	at org.jpox.AbstractPersistenceManager.internalDeletePersistent(AbstractPersistenceManager.java:1489)
          	at org.jpox.AbstractPersistenceManager.deletePersistentAll(AbstractPersistenceManager.java:1532)
          	at org.jpox.AbstractPersistenceManager.deletePersistentAll(AbstractPersistenceManager.java:1514)
          	at org.jpox.store.rdbms.scostore.FKListStore.clear(FKListStore.java:1137)
          	at org.jpox.store.mapping.CollectionMapping.deleteDependent(CollectionMapping.java:334)
          	at org.jpox.store.rdbms.table.ClassTable.deleteDependent(ClassTable.java:2651)
          	at org.jpox.store.StoreManager.deleteDependent(StoreManager.java:1076)
          	at org.jpox.state.StateManagerImpl.deletePersistent(StateManagerImpl.java:4405)
          	at org.jpox.AbstractPersistenceManager.internalDeletePersistent(AbstractPersistenceManager.java:1489)
          	at org.jpox.AbstractPersistenceManager.deletePersistent(AbstractPersistenceManager.java:1505)
          	at org.codehaus.plexus.jdo.PlexusJdoUtils.removeObject(PlexusJdoUtils.java:121)
          	at org.apache.continuum.dao.AbstractDao.removeObject(AbstractDao.java:79)
          	at org.apache.continuum.dao.BuildResultDaoImpl.removeBuildResult(BuildResultDaoImpl.java:295)
          	at org.apache.maven.continuum.DefaultContinuum.removeBuildResult(DefaultContinuum.java:1086)
          	at org.apache.maven.continuum.DefaultContinuum.removeProject(DefaultContinuum.java:671)
          	at org.apache.maven.continuum.web.action.ProjectsListAction.remove(ProjectsListAction.java:109)
          	at org.apache.maven.continuum.web.action.ProjectsListAction.execute(ProjectsListAction.java:74)
          
          Show
          Brett Porter added a comment - Here is the full trace when it occurs: ERROR 23503: DELETE on table 'PROJECTDEPENDENCY' caused a violation of foreign key constraint 'PROJECT_FK2' for key (3024679). The statement has been rolled back. at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) at org.apache.derby.impl.sql.execute.ReferencedKeyRIChecker.doCheck(Unknown Source) at org.apache.derby.impl.sql.execute.RISetChecker.doPKCheck(Unknown Source) at org.apache.derby.impl.sql.execute.DeleteResultSet.collectAffectedRows(Unknown Source) at org.apache.derby.impl.sql.execute.DeleteResultSet.open(Unknown Source) at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source) at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(Unknown Source) at org.jpox.store.rdbms.RDBMSManager.executeStatementUpdate(RDBMSManager.java:575) at org.jpox.store.rdbms.request.DeleteRequest.execute(DeleteRequest.java:274) at org.jpox.store.rdbms.table.ClassTable.delete(ClassTable.java:2611) at org.jpox.store.StoreManager.delete(StoreManager.java:1025) at org.jpox.state.StateManagerImpl.internalDeletePersistent(StateManagerImpl.java:4468) at org.jpox.state.StateManagerImpl.deletePersistent(StateManagerImpl.java:4423) at org.jpox.AbstractPersistenceManager.internalDeletePersistent(AbstractPersistenceManager.java:1489) at org.jpox.AbstractPersistenceManager.deletePersistentAll(AbstractPersistenceManager.java:1532) at org.jpox.AbstractPersistenceManager.deletePersistentAll(AbstractPersistenceManager.java:1514) at org.jpox.store.rdbms.scostore.FKListStore.clear(FKListStore.java:1137) at org.jpox.store.mapping.CollectionMapping.deleteDependent(CollectionMapping.java:334) at org.jpox.store.rdbms.table.ClassTable.deleteDependent(ClassTable.java:2651) at org.jpox.store.StoreManager.deleteDependent(StoreManager.java:1076) at org.jpox.state.StateManagerImpl.deletePersistent(StateManagerImpl.java:4405) at org.jpox.AbstractPersistenceManager.internalDeletePersistent(AbstractPersistenceManager.java:1489) at org.jpox.AbstractPersistenceManager.deletePersistent(AbstractPersistenceManager.java:1505) at org.codehaus.plexus.jdo.PlexusJdoUtils.removeObject(PlexusJdoUtils.java:121) at org.apache.continuum.dao.AbstractDao.removeObject(AbstractDao.java:79) at org.apache.continuum.dao.BuildResultDaoImpl.removeBuildResult(BuildResultDaoImpl.java:295) at org.apache.maven.continuum.DefaultContinuum.removeBuildResult(DefaultContinuum.java:1086) at org.apache.maven.continuum.DefaultContinuum.removeProject(DefaultContinuum.java:671) at org.apache.maven.continuum.web.action.ProjectsListAction.remove(ProjectsListAction.java:109) at org.apache.maven.continuum.web.action.ProjectsListAction.execute(ProjectsListAction.java:74)
          Brett Porter made changes -
          Link This issue relates to CONTINUUM-1921 [ CONTINUUM-1921 ]
          Brett Porter made changes -
          Link This issue is related to CONTINUUM-1626 [ CONTINUUM-1626 ]
          Brett Porter made changes -
          Fix Version/s 1.3.6 [ 16131 ]
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Brett Porter [ brettporter ]
          Fix Version/s Backlog [ 15656 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 08:36:01 UTC 2015 [ 1428222961749 ]
          Mark Thomas made changes -
          Workflow jira [ 12710398 ] Default workflow, editable Closed status [ 12740132 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 21:12:18 UTC 2015 [ 1428268338676 ]
          Mark Thomas made changes -
          Workflow jira [ 12947629 ] Default workflow, editable Closed status [ 12985658 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Closed Closed
          669d 23h 56m 1 Brett Porter 24/Feb/10 10:58

            People

            • Assignee:
              Brett Porter
              Reporter:
              Andreas Guther
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development