Key Constraint While Creating Deployment Plan From Template

Document ID : KB000008106
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

An error occurs while trying to create a Deployment Plan from a Deployment Template. Error message

Reason: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK9ECB63033DE668B7". The conflict occurred in database "<NOLIO_DB_NAME>", table "dbo.environments", column 'ID'.; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK9ECB63033DE668B7". The conflict occurred in database ""<NOLIO_DB_NAME>", table "dbo.environments", column 'ID'.

Environment:
CA Release Automation version 6.2 and aboveOracle DatabaseMicrosoft SQL is likely to have this issue also.
Cause:

This can/will happen when the deployment template has a preplan step assigned to it and the preplan step does not have an environment associated to run in. 

Resolution:

Assign an environment that the PrePlan step should run in and try again.