org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not delete: [com.atlassian.confluence.pages.templates.PageTemplate#1409026]; SQL []; ERROR: update or delete on table "pagetemplates" violates foreign key constraint "fkbc7ce96a17d4a070" on table "pagetemplates" Detail: Key (templateid)=(1409026) is still referenced from table "pagetemplates".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "pagetemplates" violates foreign key constraint "fkbc7ce96a17d4a070" on table "pagetemplates" Detail: Key (templateid)=(1409026) is still referenced from table "pagetemplates".

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Atlassian JIRA by Derek MacKie, 1 year ago
: Key (templateid)=(1409026) is still referenced from table "pagetemplates".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "pagetemplates" violates foreign key constraint "fkbc7ce96a17d4a070" on table "pagetemplates" Detail: Key (templateid)=(1409026) is still referenced from table "pagetemplates".
via Atlassian JIRA by Partha Kamal [Atlassian], 1 year ago
: Key (templateid)=(8782084) is still referenced from table "pagetemplates".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "pagetemplates" violates foreign key constraint "fkbc7ce96a17d4a070" on table "pagetemplates" Detail: Key (templateid)=(8782084) is still referenced from table "pagetemplates".
via Atlassian JIRA by Per Fragemann [Atlassian], 1 year ago
)=(1664222305) is still referenced from table "bodycontent".; nested exception is org.postgresql.util.PSQLException: 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".
via Atlassian JIRA by Andrew Lui [Atlassian technical writer], 1 year ago
(attachmentid)=(225247903) is still referenced from table "imagedetails".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "attachments" violates foreign key constraint "fka768048734a4917e" on table "imagedetails" Detail: Key (attachmentid)=(225247903) is still referenced from table "imagedetails".
via Atlassian JIRA by Per Fragemann [Atlassian], 1 year ago
(attachmentid)=(1778090269) is still referenced from table "attachmentdata".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "attachments" violates foreign key constraint "fk9dc3e34d34a4917e" on table "attachmentdata" Detail: Key (attachmentid)=(1778090269) is still referenced from table "attachmentdata".
org.springframework.dao.DataIntegrityViolationException: Hibernate operation: could not delete: [com.atlassian.confluence.pages.templates.PageTemplate#1409026]; SQL []; ERROR: update or delete on table "pagetemplates" violates foreign key constraint "fkbc7ce96a17d4a070" on table "pagetemplates" Detail: Key (templateid)=(1409026) is still referenced from table "pagetemplates".; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "pagetemplates" violates foreign key constraint "fkbc7ce96a17d4a070" on table "pagetemplates" Detail: Key (templateid)=(1409026) is still referenced from table "pagetemplates".

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.