Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4018

Exception while deleting top-community as systemadministrator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Code Review Needed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5
    • Fix Version/s: None
    • Component/s: API, XMLUI
    • Labels:
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      In Description

      Description

      While deleting a top-community you will eventually get an exception if there are still items in a workflow or/and in workspace.

      1. Logged in as Systemadminstrator.
      2. Delete a top-community
      3. get a PSQLException: ERROR: update or delete on table "cwf_workflowitem" violates foreign key constraint "cwf_in_progress_user_workflowitem_id_fkey" on table "cwf_in_progress_user"org.postgresql.util.PSQLException: ERROR: update or delete on table "cwf_workflowitem" violates foreign key constraint "cwf_in_progress_user_workflowitem_id_fkey" on table "cwf_in_progress_user"
      4. OR get a PSQLException: ERROR: update or delete on table "item" violates foreign key constraint "workspaceitem_item_id_fkey" on table "workspaceitem" Detail: Key (item_id)=(104771) is still referenced from table "workspaceitem".

       

       

      org.postgresql.util.PSQLException: ERROR: update or delete on table "cwf_workflowitem" violates foreign key constraint "cwf_in_progress_user_workflowitem_id_fkey" on table "cwf_in_progress_user"org.postgresql.util.PSQLException: ERROR: update or delete on table "cwf_workflowitem" violates foreign key constraint "cwf_in_progress_user_workflowitem_id_fkey" on table "cwf_in_progress_user"  Detail: Key (workflowitem_id)=(27631) is still referenced from table "cwf_in_progress_user". at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.dspace.storage.rdbms.DatabaseManager.updateQuery(DatabaseManager.java:441) at org.dspace.storage.rdbms.DatabaseManager.deleteByValue(DatabaseManager.java:612) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:571) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:796) at org.dspace.xmlworkflow.storedcomponents.XmlWorkflowItem.deleteWrapper(XmlWorkflowItem.java:532)

      ...

      ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL query updateQuery Error - ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL query updateQuery Error - org.postgresql.util.PSQLException: ERROR: update or delete on table "item" violates foreign key constraint "workspaceitem_item_id_fkey" on table "workspaceitem"  Detail: Key (item_id)=(104771) is still referenced from table "workspaceitem". at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) at org.dspace.storage.rdbms.DatabaseManager.updateQuery(DatabaseManager.java:441) at org.dspace.storage.rdbms.DatabaseManager.deleteByValue(DatabaseManager.java:612) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:571) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:796) at org.dspace.content.Item.delete(Item.java:1359) at org.dspace.content.Collection.delete(Collection.java:1299) at org.dspace.content.Community.removeCollection(Community.java:1151) at org.dspace.content.Community.rawDelete(Community.java:1296) at org.dspace.content.Community.delete(Community.java:1260)

      ...

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            gregor.gabriel Gregor Gabriel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: