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".

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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)
    via by Ivan Masár,
  • 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)
    via by Ivan Masár,
  • Hilfe Fehler beim Drucken
    via adempiere by chst0
    ,
    • 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)
    No Bugmate found.