Failed to delete the bundle deployment from a destination in JON due to database constraint or record violation
Issue
- Unable to delete old bundle deployment.
- Get an error
Failed to delete the bundle deployment -
Server log contains the following messages:
WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 2292, SQLState: 23000 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-02292: integrity constraint (RHQADMIN.SYS_C005004) violated - child record found WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 2292, SQLState: 23000 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-02292: integrity constraint (RHQADMIN.SYS_C005004) violated - child record found ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update Caused by: java.sql.BatchUpdateException: ORA-02292: integrity constraint (RHQADMIN.SYS_C005004) violated - child record found -
Server log contains the following messages:
WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 23503 ERROR [org.hibernate.util.JDBCExceptionReporter] Batch entry 0 delete from RHQ_BUNDLE_DEPLOYMENT where ID='10041' was aborted. Call getNextException to see the cause. WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 23503 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: update or delete on table "rhq_bundle_deployment" violates foreign key constraint "rhq_bundle_deployment_replaced_bundle_deployment_id_fkey" on table "rhq_bundle_deployment" Detail: Key (id)=(10041) is still referenced from table "rhq_bundle_deployment". ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update Caused by: java.sql.BatchUpdateException: Batch entry 0 delete from RHQ_BUNDLE_DEPLOYMENT where ID='10041' was aborted. Call getNextException to see the cause.
Environment
- Red Hat JBoss Operations Network (ON) 3.1, 3.2.0
- A JBoss ON provisioning bundle destination with two or more bundle deployments
- Attempting to delete a previous bundle deployment from a destination
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.