Continuum
  1. Continuum
  2. CONTINUUM-1972

Error attempting to delete project group

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.3.2 (Beta)
    • Component/s: Database
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      When trying to delete a project group:

      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 (5107). The statement has been rolled back.

      A snippet of the stack trace:

      javax.jdo.JDOUserException: One or more instances could not be deleted
      at org.jpox.AbstractPersistenceManager.deletePersistentAll(AbstractPersistenceManager.java:1525)
      at org.jpox.AbstractPersistenceManager.deletePersistentAll(AbstractPersistenceManager.java:1498)
      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:1019)
      at org.jpox.state.StateManagerImpl.deletePersistent(StateManagerImpl.java:4405)
      at org.jpox.AbstractPersistenceManager.internalDeletePersistent(AbstractPersistenceManager.java:1473)
      at org.jpox.AbstractPersistenceManager.deletePersistent(AbstractPersistenceManager.java:1489)
      at org.codehaus.plexus.jdo.PlexusJdoUtils.removeObject(PlexusJdoUtils.java:121)
      at org.apache.maven.continuum.store.JdoContinuumStore.removeObject(JdoContinuumStore.java:1906)
      at org.apache.maven.continuum.store.JdoContinuumStore.removeBuildResult(JdoContinuumStore.java:600)
      at org.apache.maven.continuum.DefaultContinuum.removeProject(DefaultContinuum.java:719)
      at org.apache.maven.continuum.DefaultContinuum.removeProjectGroup(DefaultContinuum.java:278)
      at org.apache.maven.continuum.web.action.ProjectGroupAction.remove(ProjectGroupAction.java:263)
      [...]

        Activity

        Hide
        Michael Johns added a comment -

        I cloned issue CONTINUUM-1630 rather than re-open it because I'm not sure this is the same problem. I get the same symptoms, inability to delete projects or groups, but the log message is slightly different, so I decided to create a new issue. Here's my current log message:

        java.sql.SQLException: DELETE on table 'PROJECTDEPENDENCY' caused a violation of foreign key constraint 'PROJECT_FK3' for key (4858).  The statement has been rolled back.
                at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
                at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
                at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
                at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
                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:77)
                at org.apache.continuum.dao.BuildResultDaoImpl.removeBuildResult(BuildResultDaoImpl.java:259)
                at org.apache.maven.continuum.DefaultContinuum.removeBuildResult(DefaultContinuum.java:1380)
                at org.apache.maven.continuum.DefaultContinuum.removeProject(DefaultContinuum.java:899)
                at org.apache.maven.continuum.web.action.ProjectsListAction.remove(ProjectsListAction.java:100)
                at org.apache.maven.continuum.web.action.ProjectsListAction.execute(ProjectsListAction.java:68)
        
        Show
        Michael Johns added a comment - I cloned issue CONTINUUM-1630 rather than re-open it because I'm not sure this is the same problem. I get the same symptoms, inability to delete projects or groups, but the log message is slightly different, so I decided to create a new issue. Here's my current log message: java.sql.SQLException: DELETE on table 'PROJECTDEPENDENCY' caused a violation of foreign key constraint 'PROJECT_FK3' for key (4858). The statement has been rolled back. at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) at org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source) at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102) 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:77) at org.apache.continuum.dao.BuildResultDaoImpl.removeBuildResult(BuildResultDaoImpl.java:259) at org.apache.maven.continuum.DefaultContinuum.removeBuildResult(DefaultContinuum.java:1380) at org.apache.maven.continuum.DefaultContinuum.removeProject(DefaultContinuum.java:899) at org.apache.maven.continuum.web.action.ProjectsListAction.remove(ProjectsListAction.java:100) at org.apache.maven.continuum.web.action.ProjectsListAction.execute(ProjectsListAction.java:68)
        Hide
        Michael Johns added a comment -

        Hmm... I guess I shouldn't have cloned an old issue. I don't have edit permissions, so I can't update the "Affects Version" field. This is happening in 1.2.2.

        Show
        Michael Johns added a comment - Hmm... I guess I shouldn't have cloned an old issue. I don't have edit permissions, so I can't update the "Affects Version" field. This is happening in 1.2.2.
        Hide
        Wendy Smoak added a comment -

        Adjusted affects/fix versions and assignee.

        Show
        Wendy Smoak added a comment - Adjusted affects/fix versions and assignee.
        Hide
        Wendy Smoak added a comment -

        Can you provide more info on when this happens? I can delete a newly added project. Is it when the project has build results, or notifiers, or some other configuration that you've added?

        As a workaround, try deleting anything you see in the project (build results, notifiers, etc.) and then try again to delete it.

        Show
        Wendy Smoak added a comment - Can you provide more info on when this happens? I can delete a newly added project. Is it when the project has build results, or notifiers, or some other configuration that you've added? As a workaround, try deleting anything you see in the project (build results, notifiers, etc.) and then try again to delete it.
        Hide
        Michael Johns added a comment -

        We run into this all the time, so I know it's in there. As best I can tell, it happens when there are custom build definitions added to a module within a project group. If we delete those build definitions, then we can delete the project group. It's a very unscientific analysis, but that seems to be the pattern.

        Show
        Michael Johns added a comment - We run into this all the time, so I know it's in there. As best I can tell, it happens when there are custom build definitions added to a module within a project group. If we delete those build definitions, then we can delete the project group. It's a very unscientific analysis, but that seems to be the pattern.
        Hide
        Emmanuel Venisse added a comment - - edited

        Fixed in trunk in r.755127

        Show
        Emmanuel Venisse added a comment - - edited Fixed in trunk in r.755127
        Hide
        Emmanuel Venisse added a comment -

        Fixed in 1.2.x branch in r.755137

        Show
        Emmanuel Venisse added a comment - Fixed in 1.2.x branch in r.755137

          People

          • Assignee:
            Emmanuel Venisse
            Reporter:
            Michael Johns
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: