java.sql.BatchUpdateException: Cannot add or update a child row: a foreign key constraint fails (`cart`.`orderdetails`, CONSTRAINT `FKB8CC1F34C5FC9376` FOREIGN KEY (`OID`) REFERENCES `ordermaster` (`OID`))

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 Stack Overflow by Aman J
, 1 year ago
Cannot add or update a child row: a foreign key constraint fails (`cart`.`orderdetails`, CONSTRAINT `FKB8CC1F34C5FC9376` FOREIGN KEY (`OID`) REFERENCES `ordermaster` (`OID`))
via coderanch.com by Unknown author, 1 year ago
Cannot add or update a child row: a foreign key constraint fails (`jpa`.`belong_to`, CONSTRAINT `FKD2D27D7B2A5306E7` FOREIGN KEY (`cocktail_id`) REFERENCES `cocktail` (`id`))[/color]
via Stack Overflow by user3214269
, 1 year ago
via jboss.org by Unknown author, 2 years ago
Duplicate entry 'Jane Austin' for key 'PRIMARY'
via Stack Overflow by Java Developer
, 2 years ago
Incorrect integer value: 'N' for column 'ACTIVE' at row 1
java.sql.BatchUpdateException: Cannot add or update a child row: a foreign key constraint fails (`cart`.`orderdetails`, CONSTRAINT `FKB8CC1F34C5FC9376` FOREIGN KEY (`OID`) REFERENCES `ordermaster` (`OID`))
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1669)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1085)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)

Users with the same issue

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
32 times, 1 year ago
Once, 5 months ago
6 more bugmates

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