java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`confdb_257_csp16708/attachmentdata`, CONSTRAINT `FK9DC3E34D34A4917E` FOREIGN KEY (`ATTACHMENTID`) REFERENCES `attachments` (`ATTACHMENTID`))

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 Mei Yan Chan [Atlassian], 1 year ago
Cannot delete or update a parent row: a foreign key constraint fails (`confdb_257_csp16708/attachmentdata`, CONSTRAINT `FK9DC3E34D34A4917E` FOREIGN KEY (`ATTACHMENTID`) REFERENCES `attachments` (`ATTACHMENTID`))
via Atlassian JIRA by Mei Yan Chan [Atlassian], 1 year ago
Cannot delete or update a parent row: a foreign key constraint fails (`confdb_257_csp16708/attachmentdata`, CONSTRAINT `FK9DC3E34D34A4917E` FOREIGN KEY (`ATTACHMENTID`) REFERENCES `attachments` (`ATTACHMENTID`))
via Atlassian JIRA by Dave Loeng [Atlassian], 1 year ago
Duplicate entry '1' for key 1
via Atlassian JIRA by Thomas Link, 1 year ago
Data truncation: Data truncated for column 'text_val' at row 1
java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`confdb_257_csp16708/attachmentdata`, CONSTRAINT `FK9DC3E34D34A4917E` FOREIGN KEY (`ATTACHMENTID`) REFERENCES `attachments` (`ATTACHMENTID`))
at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:648)

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.