org.postgresql.util.PSQLException

ERROR: update or delete on table "content" violates foreign key constraint "fka898d4778dd41734" on table "bodycontent" Detail: Key (contentid)=(1420) is still referenced from table "bodycontent".

Samebug tips1

Try downgrading PostgresSQL server to 9.5 or update your PostgresSQL driver to 9.4-1211 with the following command: <postgresql.version>9.4.1211</postgresql.version>

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web3203

  • via Atlassian JIRA by George Barnett, 11 months ago
    ERROR: update or delete on table "content" violates foreign key constraint "fka898d4778dd41734" on table "bodycontent" Detail: Key (contentid)=(1420) is still referenced from table "bodycontent".
  • via Atlassian JIRA by George Barnett, 1 year ago
    ERROR: update or delete on table "content" violates foreign key constraint "fka898d4778dd41734" on table "bodycontent" Detail: Key (contentid)=(1420) is still referenced from table "bodycontent".
  • ERROR: update or delete on table "content" violates foreign key constraint "fka898d4778dd41734" on table "bodycontent" Detail: Key (contentid)=(1664222305) is still referenced from table "bodycontent".
  • Stack trace

    • org.postgresql.util.PSQLException: ERROR: update or delete on table "content" violates foreign key constraint "fka898d4778dd41734" on table "bodycontent" Detail: Key (contentid)=(1420) is still referenced from table "bodycontent". at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:110) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:276) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:354) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:376) at com.atlassian.confluence.upgrade.upgradetask.RemoveDuplicatePersonalInformationUpgradeTask$1.doInTransactionWithoutResult(RemoveDuplicatePersonalInformationUpgradeTask.java:48) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:127) at com.atlassian.confluence.upgrade.upgradetask.RemoveDuplicatePersonalInformationUpgradeTask.doUpgrade(RemoveDuplicatePersonalInformationUpgradeTask.java:43) at com.atlassian.confluence.upgrade.AbstractUpgradeManager.doUpgrade(AbstractUpgradeManager.java:115) Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "content" violates foreign key constraint "fka898d4778dd41734" on table "bodycontent" Detail: Key (contentid)=(1420) is still referenced from table "bodycontent". at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:430) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:332) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:324) at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:1006) at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:369) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:343) ... 9 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    9 times, 1 month ago
    Unknown user
    Once, 4 months ago
    6 times, 7 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    90 more bugmates