2 Replies Latest reply on Aug 22, 2018 12:03 PM by Bill Robinson

    ORA-02291: integrity constraint (BSA.FK1_JOB_RUN) violated - parent key not found

    Marcel Drechsler
      Share This:

      We're running Server Automation 8.6 and I coincidentally saw the following error being logged constantly:

       

      [22 Aug 2018 12:46:49,173] [Scheduled-System-Tasks-Thread-7] [WARN] [System:System:] [Update Job Run Counts] Update of counts for job run with id = 2311469 should have returned 1 row, but returned 0

      [22 Aug 2018 12:46:54,173] [Scheduled-System-Tasks-Thread-7] [WARN] [System:System:] [Update Job Run Counts] Update of counts for job run with id = 2311469 should have returned 1 row, but returned 0

      [22 Aug 2018 12:46:59,173] [Scheduled-System-Tasks-Thread-7] [WARN] [System:System:] [Update Job Run Counts] Update of counts for job run with id = 2311469 should have returned 1 row, but returned 0

      [22 Aug 2018 12:47:01,873] [Log-Item-Writer-Thread-2] [INFO] [::] [] SQLException: Sql State (23000) Vendor Code (2291)

      [22 Aug 2018 12:47:01,874] [Log-Item-Writer-Thread-2] [ERROR] [::] [] ORA-02291: integrity constraint (BSA.FK1_JOB_RUN) violated - parent key not found

              at com.bladelogic.om.infra.app.db.TransactionalOperation.execute(TransactionalOperation.java:158)

              at com.bladelogic.om.infra.app.service.job.LogItemWriter.flushLogItems(LogItemWriter.java:204)

              at com.bladelogic.om.infra.app.service.job.LogItemWriter$LogItemWriterThread.run(LogItemWriter.java:99)

      Caused by: java.sql.BatchUpdateException: ORA-02291: integrity constraint (BSA.FK1_JOB_RUN) violated - parent key not found

       

              at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10296)

              at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:216)

              at com.bladelogic.om.infra.shared.db.BlPreparedStatement.executeBatch(BlPreparedStatement.java:254)

              at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)

              at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)

              at com.bladelogic.om.infra.app.service.db.DefaultDatabaseServiceImpl.executeBatch(DefaultDatabaseServiceImpl.java:851)

              at com.bladelogic.om.infra.app.service.db.DefaultDatabaseServiceImpl.executeBatch(DefaultDatabaseServiceImpl.java:797)

              at com.bladelogic.om.infra.app.service.db.UserTransactionImpl.flushInserts(UserTransactionImpl.java:242)

              at com.bladelogic.om.infra.app.service.db.UserTransactionImpl.commit(UserTransactionImpl.java:127)

              at com.bladelogic.om.infra.app.service.session.SessionImpl.commitUserTransaction(SessionImpl.java:352)

              at com.bladelogic.om.infra.app.db.TransactionalOperation.manageTransaction(TransactionalOperation.java:188)

              at com.bladelogic.om.infra.app.db.TransactionalOperation.execute(TransactionalOperation.java:136)

       

      Is this a known error? This error seems to be logged even when no jobs are running and I'm not aware of any problems with running jobs. It's also interesting that the id "2311469" does not change. I'm not sure how long this error exists.

       

      On research I actually found this article in the community, but I'm not sure if this is anyhow related. We're running a db cleanup jobs on a daily basis (TYPICAL and CLEAN_ALL_AS) and they're running fine without any errors.