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`))

Stack Overflow | Aman J | 4 months ago
  1. 0

    Insert a row in a table without committing a required foreign key

    Stack Overflow | 4 months ago | Aman J
    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`))
  2. 0

    Hibernate handle with tinyint column in mysql database?

    Stack Overflow | 4 years ago | Java Developer
    java.sql.BatchUpdateException: Incorrect integer value: 'N' for column 'ACTIVE' at row 1
  3. 0

    ConstraintViolationException not showing constraint name MySQL

    Stack Overflow | 4 years ago | Parthiv Dixit
    java.sql.BatchUpdateException: Duplicate entry '2-3' for key 4
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exception: Duplicate entry '1-\x01' for key 'PRIMARY'

    Stack Overflow | 3 years ago | user3214269
    java.sql.BatchUpdateException: Duplicate entry '1-\x01' for key 'PRIMARY'
  6. 0

    How to enter first 100 character of 200 in mysql

    Stack Overflow | 6 years ago | Khoyendra Pande
    java.sql.BatchUpdateException: Data truncation: Data too long for column 'FBUrl' at row 1 <code>at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1527)

  1. linxiaolong 36 times, last 6 days ago
  2. linxiaolong 4 times, last 4 months ago
  3. mortalman7 32 times, last 5 months ago
9 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  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()
  2. MySQL jdbc
    PreparedStatement.executeBatch
    1. com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1669)
    2. com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1085)
    2 frames
  3. Hibernate
    AbstractBatcher.executeBatch
    1. org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
    2. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
    2 frames