Cloud Manager pipeline shows failed due to “OPTIMISTIC_LOCKING_FAILED” after successful deployment
A Cloud Manager deployment pipeline for AEM as a Cloud Service shows as failed, with few or no logs visible in the UI, even though the deployment completes successfully and the environment remains healthy. The failure is triggered by an internal Cloud Manager bookkeeping error (OPTIMISTIC_LOCKING_FAILED) during deployment‑history or task‑state updates, not by an issue in the actual AEM deployment.
To fix this, verify that the environment is accessible, confirm the error details, and rerun the pipeline to generate a successful status in Cloud Manager.
Description description
Environment
- Adobe Experience Manager as a Cloud Service (AEMaaCS)
- Cloud Manager
Issue/Symptoms
-
A deployment pipeline runs longer than usual (for example, over 1 hour) and then fails at the deploy step.
-
A deployment pipeline shows as failed in Cloud Manager even though the AEM environment is usable.
-
In the failure details (HAL, API, or logs), you see details similar to:
- errorCode: OPTIMISTIC_LOCKING_FAILED
- causedBy: CLOUD_MANAGER
- exceptionClass: org.springframework.orm.ObjectOptimisticLockingFailureException (or a similar optimistic locking or StaleObjectStateException).
-
AEM author, publish, and preview endpoints are accessible and functional.
-
Kubernetes or Skyline dashboards show the environment deployment as completed or succeeded.
Resolution resolution
To resolve the issue, follow these steps:
-
Open the affected AEM as a Cloud Service environment and verify that the author, publish, and (if applicable) preview endpoints are accessible and functional.
-
Confirm in your Kubernetes or Skyline monitoring tools that the environment deployment shows as completed or succeeded.
-
Review the Cloud Manager pipeline run details and confirm that the failure shows an internal optimistic locking error, such as:
- errorCode: OPTIMISTIC_LOCKING_FAILED
- causedBy: CLOUD_MANAGER
- exceptionClass: org.springframework.orm.ObjectOptimisticLockingFailureException or a similar optimistic locking or StaleObjectStateException.
-
Validate that no functional issues exist in AEM, such as missing content, broken services, or application-level errors. If you see application-level code errors (for example, missing dependencies or mappings), address those separately because they don’t cause the OPTIMISTIC_LOCKING_FAILED pipeline failure.
-
If you need a clean successful (“green”) run in the Cloud Manager UI for tracking or compliance, rerun the same pipeline without changes.
-
After the rerun completes, verify that the pipeline shows as successful in Cloud Manager and that the environment remains healthy.
-
If the error continues to appear across multiple retries or if the environment isn’t healthy, collect the Cloud Manager run ID, relevant logs, and environment details, and contact Adobe support for further investigation.