java.sql.SQLException: ORA-02292: integrity constraint (RWATKINS.OIAN_ORDER_INVOICE_ID_FK) violated - child record found

Hibernate JIRA | Robert Watkins | 1 decade ago
  1. 0

    I have both many-to-many and one-to-many mappings in my project. When I delete the entities, the deletion isn't cascaded accordingly. Thus, dependent objects aren't deleted from the database (either the 'many' side of the one-to-many, or the entries in the join table for the many-to-many). Example mapping (one-to-many): Booking -> BookingNight. HQL: delete from Booking Error: 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl parse FINE: parse() - HQL: delete from com.wotif.jaguar.domain.booking.Booking 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl showHqlAst FINE: --- HQL AST --- \-[DELETE] 'delete' \-[FROM] 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase' \-[DOT] '.' +-[DOT] '.' | +-[DOT] '.' | | +-[DOT] '.' | | | +-[DOT] '.' | | | | +-[IDENT] 'com' | | | | \-[IDENT] 'wotif' | | | \-[IDENT] 'jaguar' | | \-[IDENT] 'domain' | \-[IDENT] 'booking' \-[IDENT] 'Booking' 19/04/2005 13:57:03 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 13:57:03 org.hibernate.hql.ast.FromElement doInitialize FINE: FromClause{level=1} : com.wotif.jaguar.domain.booking.Booking (no alias) -> booking0_ 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl analyze FINE: --- SQL AST --- \-[DELETE] QueryNode: 'delete' querySpaces (ORDER_INVOICE) \-[FROM] FromClause: 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[booking0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]} \-[FROM_FRAGMENT] FromElement: 'ORDER_INVOICE' FromElement{explicit,not a collection join,classAlias=null,role=null,tableName=ORDER_INVOICE,tableAlias=booking0_,colums={,className=com.wotif.jaguar.domain.booking.Booking}} 19/04/2005 13:57:03 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: HQL: delete from com.wotif.jaguar.domain.booking.Booking 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: SQL: delete from ORDER_INVOICE 19/04/2005 13:57:03 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 13:57:03 org.hibernate.jdbc.AbstractBatcher logOpenPreparedStatement FINE: about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 19/04/2005 13:57:03 org.hibernate.jdbc.AbstractBatcher log FINE: delete from ORDER_INVOICE 19/04/2005 13:57:03 org.hibernate.jdbc.AbstractBatcher logClosePreparedStatement FINE: about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 19/04/2005 13:57:03 org.hibernate.util.JDBCExceptionReporter logExceptions FINE: could not execute update query [delete from ORDER_INVOICE] java.sql.SQLException: ORA-02292: integrity constraint (RWATKINS.OIAN_ORDER_INVOICE_ID_FK) violated - child record found at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960) at org.hibernate.hql.ast.UpdateStatementExecutor.execute(UpdateStatementExecutor.java:67) at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:292) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:815) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) at com.wotif.jaguar.util.HibernateTestUtil.deleteAll(HibernateTestUtil.java:307) at com.wotif.jaguar.util.HibernateTestUtil.deleteAll(HibernateTestUtil.java:251) at com.wotif.jaguar.hibernate.HibernateConfigTest.testDeleteAll(HibernateConfigTest.java:160) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.textui.TestRunner.doRun(TestRunner.java:116) at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.java:57) at junit.textui.TestRunner.start(TestRunner.java:172) at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(TextTestRunner2.java:23) at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:97) at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31) 19/04/2005 13:57:03 org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 2292, SQLState: 23000 19/04/2005 13:57:03 org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: ORA-02292: integrity constraint (RWATKINS.OIAN_ORDER_INVOICE_ID_FK) violated - child record found ---- Example mapping (many-to-many): RoomType <--> RoomFacility HQL: delete from RoomType Error: 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl parse FINE: parse() - HQL: delete from com.wotif.jaguar.domain.property.RoomType 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl showHqlAst FINE: --- HQL AST --- \-[DELETE] 'delete' \-[FROM] 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase' \-[DOT] '.' +-[DOT] '.' | +-[DOT] '.' | | +-[DOT] '.' | | | +-[DOT] '.' | | | | +-[IDENT] 'com' | | | | \-[IDENT] 'wotif' | | | \-[IDENT] 'jaguar' | | \-[IDENT] 'domain' | \-[IDENT] 'property' \-[IDENT] 'RoomType' 19/04/2005 14:16:40 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 14:16:40 org.hibernate.hql.ast.FromElement doInitialize FINE: FromClause{level=1} : com.wotif.jaguar.domain.property.RoomType (no alias) -> roomtype0_ 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl analyze FINE: --- SQL AST --- \-[DELETE] QueryNode: 'delete' querySpaces (PROP_MASTER_ROOM_TYPE) \-[FROM] FromClause: 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[roomtype0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]} \-[FROM_FRAGMENT] FromElement: 'PROP_MASTER_ROOM_TYPE' FromElement{explicit,not a collection join,classAlias=null,role=null,tableName=PROP_MASTER_ROOM_TYPE,tableAlias=roomtype0_,colums={,className=com.wotif.jaguar.domain.property.RoomType}} 19/04/2005 14:16:40 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: HQL: delete from com.wotif.jaguar.domain.property.RoomType 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: SQL: delete from PROP_MASTER_ROOM_TYPE 19/04/2005 14:16:40 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 14:16:40 org.hibernate.jdbc.AbstractBatcher logOpenPreparedStatement FINE: about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 19/04/2005 14:16:40 org.hibernate.jdbc.AbstractBatcher log FINE: delete from PROP_MASTER_ROOM_TYPE 19/04/2005 14:16:40 org.hibernate.jdbc.AbstractBatcher logClosePreparedStatement FINE: about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 19/04/2005 14:16:40 org.hibernate.util.JDBCExceptionReporter logExceptions FINE: could not execute update query [delete from PROP_MASTER_ROOM_TYPE] java.sql.SQLException: ORA-02292: integrity constraint (RWATKINS.PMRTF_PROP_ROOM_TYPE_ID_FK) violated - child record found at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960) at org.hibernate.hql.ast.UpdateStatementExecutor.execute(UpdateStatementExecutor.java:67) at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:292) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:815) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) ... Obvious workaround would be to use deletion cascade in the database, but this worked in Hibernate 2.1.6 without those triggers.

    Hibernate JIRA | 1 decade ago | Robert Watkins
    java.sql.SQLException: ORA-02292: integrity constraint (RWATKINS.OIAN_ORDER_INVOICE_ID_FK) violated - child record found
  2. 0

    I have both many-to-many and one-to-many mappings in my project. When I delete the entities, the deletion isn't cascaded accordingly. Thus, dependent objects aren't deleted from the database (either the 'many' side of the one-to-many, or the entries in the join table for the many-to-many). Example mapping (one-to-many): Booking -> BookingNight. HQL: delete from Booking Error: 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl parse FINE: parse() - HQL: delete from com.wotif.jaguar.domain.booking.Booking 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl showHqlAst FINE: --- HQL AST --- \-[DELETE] 'delete' \-[FROM] 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase' \-[DOT] '.' +-[DOT] '.' | +-[DOT] '.' | | +-[DOT] '.' | | | +-[DOT] '.' | | | | +-[IDENT] 'com' | | | | \-[IDENT] 'wotif' | | | \-[IDENT] 'jaguar' | | \-[IDENT] 'domain' | \-[IDENT] 'booking' \-[IDENT] 'Booking' 19/04/2005 13:57:03 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 13:57:03 org.hibernate.hql.ast.FromElement doInitialize FINE: FromClause{level=1} : com.wotif.jaguar.domain.booking.Booking (no alias) -> booking0_ 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl analyze FINE: --- SQL AST --- \-[DELETE] QueryNode: 'delete' querySpaces (ORDER_INVOICE) \-[FROM] FromClause: 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[booking0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]} \-[FROM_FRAGMENT] FromElement: 'ORDER_INVOICE' FromElement{explicit,not a collection join,classAlias=null,role=null,tableName=ORDER_INVOICE,tableAlias=booking0_,colums={,className=com.wotif.jaguar.domain.booking.Booking}} 19/04/2005 13:57:03 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: HQL: delete from com.wotif.jaguar.domain.booking.Booking 19/04/2005 13:57:03 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: SQL: delete from ORDER_INVOICE 19/04/2005 13:57:03 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 13:57:03 org.hibernate.jdbc.AbstractBatcher logOpenPreparedStatement FINE: about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 19/04/2005 13:57:03 org.hibernate.jdbc.AbstractBatcher log FINE: delete from ORDER_INVOICE 19/04/2005 13:57:03 org.hibernate.jdbc.AbstractBatcher logClosePreparedStatement FINE: about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 19/04/2005 13:57:03 org.hibernate.util.JDBCExceptionReporter logExceptions FINE: could not execute update query [delete from ORDER_INVOICE] java.sql.SQLException: ORA-02292: integrity constraint (RWATKINS.OIAN_ORDER_INVOICE_ID_FK) violated - child record found at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960) at org.hibernate.hql.ast.UpdateStatementExecutor.execute(UpdateStatementExecutor.java:67) at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:292) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:815) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) at com.wotif.jaguar.util.HibernateTestUtil.deleteAll(HibernateTestUtil.java:307) at com.wotif.jaguar.util.HibernateTestUtil.deleteAll(HibernateTestUtil.java:251) at com.wotif.jaguar.hibernate.HibernateConfigTest.testDeleteAll(HibernateConfigTest.java:160) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.textui.TestRunner.doRun(TestRunner.java:116) at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.java:57) at junit.textui.TestRunner.start(TestRunner.java:172) at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(TextTestRunner2.java:23) at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:97) at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31) 19/04/2005 13:57:03 org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 2292, SQLState: 23000 19/04/2005 13:57:03 org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: ORA-02292: integrity constraint (RWATKINS.OIAN_ORDER_INVOICE_ID_FK) violated - child record found ---- Example mapping (many-to-many): RoomType <--> RoomFacility HQL: delete from RoomType Error: 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl parse FINE: parse() - HQL: delete from com.wotif.jaguar.domain.property.RoomType 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl showHqlAst FINE: --- HQL AST --- \-[DELETE] 'delete' \-[FROM] 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase' \-[DOT] '.' +-[DOT] '.' | +-[DOT] '.' | | +-[DOT] '.' | | | +-[DOT] '.' | | | | +-[IDENT] 'com' | | | | \-[IDENT] 'wotif' | | | \-[IDENT] 'jaguar' | | \-[IDENT] 'domain' | \-[IDENT] 'property' \-[IDENT] 'RoomType' 19/04/2005 14:16:40 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 14:16:40 org.hibernate.hql.ast.FromElement doInitialize FINE: FromClause{level=1} : com.wotif.jaguar.domain.property.RoomType (no alias) -> roomtype0_ 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl analyze FINE: --- SQL AST --- \-[DELETE] QueryNode: 'delete' querySpaces (PROP_MASTER_ROOM_TYPE) \-[FROM] FromClause: 'implied-from-so-i-can-use-the-fromClause-rule-during-analysis-phase' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[], fromElementByTableAlias=[roomtype0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]} \-[FROM_FRAGMENT] FromElement: 'PROP_MASTER_ROOM_TYPE' FromElement{explicit,not a collection join,classAlias=null,role=null,tableName=PROP_MASTER_ROOM_TYPE,tableAlias=roomtype0_,colums={,className=com.wotif.jaguar.domain.property.RoomType}} 19/04/2005 14:16:40 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: HQL: delete from com.wotif.jaguar.domain.property.RoomType 19/04/2005 14:16:40 org.hibernate.hql.ast.QueryTranslatorImpl generate FINE: SQL: delete from PROP_MASTER_ROOM_TYPE 19/04/2005 14:16:40 org.hibernate.hql.ast.ErrorCounter throwQueryException FINE: throwQueryException() : no errors 19/04/2005 14:16:40 org.hibernate.jdbc.AbstractBatcher logOpenPreparedStatement FINE: about to open PreparedStatement (open PreparedStatements: 0, globally: 0) 19/04/2005 14:16:40 org.hibernate.jdbc.AbstractBatcher log FINE: delete from PROP_MASTER_ROOM_TYPE 19/04/2005 14:16:40 org.hibernate.jdbc.AbstractBatcher logClosePreparedStatement FINE: about to close PreparedStatement (open PreparedStatements: 1, globally: 1) 19/04/2005 14:16:40 org.hibernate.util.JDBCExceptionReporter logExceptions FINE: could not execute update query [delete from PROP_MASTER_ROOM_TYPE] java.sql.SQLException: ORA-02292: integrity constraint (RWATKINS.PMRTF_PROP_ROOM_TYPE_ID_FK) violated - child record found at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181) at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888) at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960) at org.hibernate.hql.ast.UpdateStatementExecutor.execute(UpdateStatementExecutor.java:67) at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:292) at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:815) at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89) ... Obvious workaround would be to use deletion cascade in the database, but this worked in Hibernate 2.1.6 without those triggers.

    Hibernate JIRA | 1 decade ago | Robert Watkins
    java.sql.SQLException: ORA-02292: integrity constraint (RWATKINS.OIAN_ORDER_INVOICE_ID_FK) violated - child record found
  3. 0

    Statements within catch block is not executing

    Stack Overflow | 4 years ago | Mistu4u
    java.sql.SQLException: ORA-00001: unique constraint (SYSTEM.PK_USERID) violated
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    4 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.SQLException

      ORA-02292: integrity constraint (RWATKINS.OIAN_ORDER_INVOICE_ID_FK) violated - child record found

      at oracle.jdbc.driver.DatabaseError.throwSqlException()
    2. Oracle jdbc
      OraclePreparedStatement.executeUpdate
      1. oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
      2. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
      3. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
      4. oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
      5. oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
      6. oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:543)
      7. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
      8. oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
      9. oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960)
      9 frames
    3. Hibernate HQL/JP-QL Parser
      QueryTranslatorImpl.executeUpdate
      1. org.hibernate.hql.ast.UpdateStatementExecutor.execute(UpdateStatementExecutor.java:67)
      2. org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:292)
      2 frames
    4. Hibernate
      QueryImpl.executeUpdate
      1. org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:815)
      2. org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89)
      2 frames
    5. com.wotif.jaguar
      HibernateConfigTest.testDeleteAll
      1. com.wotif.jaguar.util.HibernateTestUtil.deleteAll(HibernateTestUtil.java:307)
      2. com.wotif.jaguar.util.HibernateTestUtil.deleteAll(HibernateTestUtil.java:251)
      3. com.wotif.jaguar.hibernate.HibernateConfigTest.testDeleteAll(HibernateConfigTest.java:160)
      3 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    7. JUnit
      TestRunner.doRun
      1. junit.framework.TestCase.runTest(TestCase.java:154)
      2. junit.framework.TestCase.runBare(TestCase.java:127)
      3. junit.framework.TestResult$1.protect(TestResult.java:106)
      4. junit.framework.TestResult.runProtected(TestResult.java:124)
      5. junit.framework.TestResult.run(TestResult.java:109)
      6. junit.framework.TestCase.run(TestCase.java:118)
      7. junit.framework.TestSuite.runTest(TestSuite.java:208)
      8. junit.framework.TestSuite.run(TestSuite.java:203)
      9. junit.textui.TestRunner.doRun(TestRunner.java:116)
      9 frames
    8. com.intellij.rt
      IdeaJUnitAgent.doRun
      1. com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.java:57)
      1 frame
    9. JUnit
      TestRunner.start
      1. junit.textui.TestRunner.start(TestRunner.java:172)
      1 frame
    10. IDEA
      TextTestRunner2.startRunnerWithArgs
      1. com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(TextTestRunner2.java:23)
      1 frame
    11. com.intellij.rt
      JUnitStarter.main
      1. com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:97)
      2. com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31)
      2 frames