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.

Apache's JIRA Issue Tracker | Michael Johns | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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) [...]

    Apache's JIRA Issue Tracker | 8 years ago | Michael Johns
    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.
  2. 0

    exception syncing with sync_on_incoming_batch

    symmetricds | 8 years ago | psi_teck
    java.lang.RuntimeException: Unable to update SALE_RETURN_LINE_ITEM: {insert,36,9,9.99,1,1,45}

    Root Cause Analysis

    1. 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()
    2. Apache Derby Client JDBC Driver
      PreparedStatement.executeUpdate
      1. org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
      2. org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
      3. org.apache.derby.client.am.PreparedStatement.executeUpdate(Unknown Source)
      3 frames
    3. org.apache.tomcat
      DelegatingPreparedStatement.executeUpdate
      1. org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
      1 frame
    4. org.jpox.store
      StoreManager.delete
      1. org.jpox.store.rdbms.RDBMSManager.executeStatementUpdate(RDBMSManager.java:575)
      2. org.jpox.store.rdbms.request.DeleteRequest.execute(DeleteRequest.java:274)
      3. org.jpox.store.rdbms.table.ClassTable.delete(ClassTable.java:2611)
      4. org.jpox.store.StoreManager.delete(StoreManager.java:1025)
      4 frames
    5. org.jpox.state
      StateManagerImpl.deletePersistent
      1. org.jpox.state.StateManagerImpl.internalDeletePersistent(StateManagerImpl.java:4468)
      2. org.jpox.state.StateManagerImpl.deletePersistent(StateManagerImpl.java:4423)
      2 frames
    6. org.jpox
      AbstractPersistenceManager.deletePersistentAll
      1. org.jpox.AbstractPersistenceManager.internalDeletePersistent(AbstractPersistenceManager.java:1489)
      2. org.jpox.AbstractPersistenceManager.deletePersistentAll(AbstractPersistenceManager.java:1532)
      3. org.jpox.AbstractPersistenceManager.deletePersistentAll(AbstractPersistenceManager.java:1514)
      3 frames
    7. org.jpox.store
      StoreManager.deleteDependent
      1. org.jpox.store.rdbms.scostore.FKListStore.clear(FKListStore.java:1137)
      2. org.jpox.store.mapping.CollectionMapping.deleteDependent(CollectionMapping.java:334)
      3. org.jpox.store.rdbms.table.ClassTable.deleteDependent(ClassTable.java:2651)
      4. org.jpox.store.StoreManager.deleteDependent(StoreManager.java:1076)
      4 frames
    8. org.jpox.state
      StateManagerImpl.deletePersistent
      1. org.jpox.state.StateManagerImpl.deletePersistent(StateManagerImpl.java:4405)
      1 frame
    9. org.jpox
      AbstractPersistenceManager.deletePersistent
      1. org.jpox.AbstractPersistenceManager.internalDeletePersistent(AbstractPersistenceManager.java:1489)
      2. org.jpox.AbstractPersistenceManager.deletePersistent(AbstractPersistenceManager.java:1505)
      2 frames
    10. org.codehaus.plexus
      PlexusJdoUtils.removeObject
      1. org.codehaus.plexus.jdo.PlexusJdoUtils.removeObject(PlexusJdoUtils.java:121)
      1 frame
    11. org.apache.continuum
      BuildResultDaoImpl.removeBuildResult
      1. org.apache.continuum.dao.AbstractDao.removeObject(AbstractDao.java:77)
      2. org.apache.continuum.dao.BuildResultDaoImpl.removeBuildResult(BuildResultDaoImpl.java:259)
      2 frames
    12. org.apache.maven
      ProjectsListAction.execute
      1. org.apache.maven.continuum.DefaultContinuum.removeBuildResult(DefaultContinuum.java:1380)
      2. org.apache.maven.continuum.DefaultContinuum.removeProject(DefaultContinuum.java:899)
      3. org.apache.maven.continuum.web.action.ProjectsListAction.remove(ProjectsListAction.java:100)
      4. org.apache.maven.continuum.web.action.ProjectsListAction.execute(ProjectsListAction.java:68)
      4 frames