java.sql.BatchUpdateException: Cannot add or update a child row: a foreign key constraint fails (`Prism`.`prism_data_extra`, CONSTRAINT `prism_data_extra_ibfk_1` FOREIGN KEY (`data_id`) REFERENCES `prism_data` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION)

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 GitHub by Eufranio
, 1 year ago
Cannot add or update a child row: a foreign key constraint fails (`Prism`.`prism_data_extra`, CONSTRAINT `prism_data_extra_ibfk_1` FOREIGN KEY (`data_id`) REFERENCES `prism_data` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION)
via Stack Overflow by Nesma Zaki
, 2 years ago
Duplicate entry '5' for key 'PRIMARY'
via https://bugzilla.redhat.com/bugzilla/ by Dennis Crissman, 1 year ago
Cannot add or update a child row: a foreign key constraint fails (`candlepin`.`cp_consumer_facts`, CONSTRAINT `FK278CE8101186666B` FOREIGN KEY (`cp_consumer_id`) REFERENCES `cp_consumer` (`id`))
via javacodegeeks.com by Unknown author, 2 years ago
via Stack Overflow by Suri
, 2 years ago
Data truncation: Data too long for column 'docName' at row 1
via perforce.com by Unknown author, 1 year ago
Incorrect string value: '\xF2\xB6\xA9\xB8\xEF\xBF...' for column 'DESC' at row 1
java.sql.BatchUpdateException: Cannot add or update a child row: a foreign key constraint fails (`Prism`.`prism_data_extra`, CONSTRAINT `prism_data_extra_ibfk_1` FOREIGN KEY (`data_id`) REFERENCES `prism_data` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION)
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2018)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449)
at me.botsko.prism.actionlibs.RecordingTask.insertExtraData(RecordingTask.java:322)
at me.botsko.prism.actionlibs.RecordingTask.insertActionsIntoDatabase(RecordingTask.java:256)
at me.botsko.prism.actionlibs.RecordingTask.save(RecordingTask.java:36)
at me.botsko.prism.actionlibs.RecordingTask.run(RecordingTask.java:352)
at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71)
at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

32 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

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