rg.postgresql.util.PSQLException: ERROR: update or delete on table "metadatafieldregistry" violates foreign key constraint "metadatavalue_metadata_field_id_fkey" on table "metadatavalue" Detail: Key (metadata_field_id)=(90) is still referenced from table "metadatavalue".

Sakai JIRA | Ivan Masár | 4 years ago
  1. 0

    DS-12 fixed this problem long time ago in JSPUI. But in XMLUI after deleting a metadata field that still has values present this error page shows up: org.postgresql.util.PSQLException: ERROR: update or delete on table "metadatafieldregistry" violates foreign key constraint "metadatavalue_metadata_field_id_fkey" on table "metadatavalue" Detail: Key (metadata_field_id)=(90) is still referenced from table "metadatavalue". Here's the Java stacktrace: rg.postgresql.util.PSQLException: ERROR: update or delete on table "metadatafieldregistry" violates foreign key constraint "metadatavalue_metadata_field_id_fkey" on table "metadatavalue" Detail: Key (metadata_field_id)=(90) is still referenced from table "metadatavalue". 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:421) at org.dspace.storage.rdbms.DatabaseManager.deleteByValue(DatabaseManager.java:572) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:536) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:760) at org.dspace.content.MetadataField.delete(MetadataField.java:485) at org.dspace.app.xmlui.aspect.administrative.FlowRegistryUtils.processDeleteMetadataField(FlowRegistryUtils.java:398)

    Sakai JIRA | 4 years ago | Ivan Masár
    rg.postgresql.util.PSQLException: ERROR: update or delete on table "metadatafieldregistry" violates foreign key constraint "metadatavalue_metadata_field_id_fkey" on table "metadatavalue" Detail: Key (metadata_field_id)=(90) is still referenced from table "metadatavalue".
  2. 0

    DS-12 fixed this problem long time ago in JSPUI. But in XMLUI after deleting a metadata field that still has values present this error page shows up: org.postgresql.util.PSQLException: ERROR: update or delete on table "metadatafieldregistry" violates foreign key constraint "metadatavalue_metadata_field_id_fkey" on table "metadatavalue" Detail: Key (metadata_field_id)=(90) is still referenced from table "metadatavalue". Here's the Java stacktrace: rg.postgresql.util.PSQLException: ERROR: update or delete on table "metadatafieldregistry" violates foreign key constraint "metadatavalue_metadata_field_id_fkey" on table "metadatavalue" Detail: Key (metadata_field_id)=(90) is still referenced from table "metadatavalue". 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:421) at org.dspace.storage.rdbms.DatabaseManager.deleteByValue(DatabaseManager.java:572) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:536) at org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:760) at org.dspace.content.MetadataField.delete(MetadataField.java:485) at org.dspace.app.xmlui.aspect.administrative.FlowRegistryUtils.processDeleteMetadataField(FlowRegistryUtils.java:398)

    Sakai JIRA | 4 years ago | Ivan Masár
    rg.postgresql.util.PSQLException: ERROR: update or delete on table "metadatafieldregistry" violates foreign key constraint "metadatavalue_metadata_field_id_fkey" on table "metadatavalue" Detail: Key (metadata_field_id)=(90) is still referenced from table "metadatavalue".
  3. 0

    Hilfe Fehler beim Drucken

    adempiere | 9 years ago | chst0
    rg.postgresql.util.PSQLException: ERROR: could not load library "/home/postgres/ADempiere/postgresql/8.2.3/lib/pljava.so": libjvm.so: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. rg.postgresql.util.PSQLException

      ERROR: update or delete on table "metadatafieldregistry" violates foreign key constraint "metadatavalue_metadata_field_id_fkey" on table "metadatavalue" Detail: Key (metadata_field_id)=(90) is still referenced from table "metadatavalue".

      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse()
    2. PostgreSQL JDBC Driver
      AbstractJdbc2Statement.executeUpdate
      1. org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
      2. org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
      3. org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
      4. org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
      5. org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
      6. org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
      6 frames
    3. Commons DBCP
      DelegatingPreparedStatement.executeUpdate
      1. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      2. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      3. org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      3 frames
    4. DSpace Kernel :: API and Implementation
      MetadataField.delete
      1. org.dspace.storage.rdbms.DatabaseManager.updateQuery(DatabaseManager.java:421)
      2. org.dspace.storage.rdbms.DatabaseManager.deleteByValue(DatabaseManager.java:572)
      3. org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:536)
      4. org.dspace.storage.rdbms.DatabaseManager.delete(DatabaseManager.java:760)
      5. org.dspace.content.MetadataField.delete(MetadataField.java:485)
      5 frames
    5. org.dspace.app
      FlowRegistryUtils.processDeleteMetadataField
      1. org.dspace.app.xmlui.aspect.administrative.FlowRegistryUtils.processDeleteMetadataField(FlowRegistryUtils.java:398)
      1 frame