AEM Cloud Manager DEV deployments fail due to XML and ClientLib errors
This article explains the causes and resolution steps for deployment failures and increased deployment times in Adobe Experience Manager (AEM) Cloud Manager DEV environments caused by XML syntax errors and client library compilation issues.
Description description
Environment
- Adobe Experience Manager (AEM) Cloud Manager (all versions)
Issue/Symptoms
-
DEV deployments take significantly longer than usual (more than two hours) and ultimately fail during the deployment stage.
-
The deployment pipeline passes validation, build, unit testing, code scanning, and image build stages but fails at the Deploy to DEV stage.
-
Deployment logs show errors related to missing XML end tags in content packages, such as:
The element type “content” must be terminated by the matching end-tag "
</content>".The element type “header” must be terminated by the matching end-tag "
</header>". -
Distribution package imports fail because of XML parsing errors.
-
Client library (ClientLib) LESS compilation errors occur, such as undefined variables (for example, @white) and missing mixins.
-
Java compilation errors occur for unresolved custom model classes.
-
These errors were previously present but did not cause deployment failures. They now result in pipeline failures.
Cause
Deployment failures occur because of XML syntax errors (missing end tags), unresolved client library variables or mixins, and missing custom Java model classes. Recent pipeline or environment changes can cause these issues to fail deployments, even if they were previously nonblocking.
Resolution resolution
Follow these steps to resolve the issue:
- Access the Cloud Manager pipeline execution logs for the failed deployment.
- Identify all XML parsing errors and client library compilation errors.
- Locate the referenced XML files, for example, under
/conf/.../settings/wcm/templates/. - Ensure that all XML elements, such as
<content>and<header>, include matching closing tags such as</content>and</header>. - Validate the XML structure with an XML validator before committing changes.
- Review LESS and CSS files for undefined variables, such as
@whiteand@mid-blue, and missing mixins, such as.label-small-style()and.media(). - Define missing variables and mixins, or update imports to include the required definitions.
- Rebuild the client libraries locally to confirm successful compilation.
- Ensure that all custom Sling model classes referenced by components are present and correctly imported in the codebase.
- Resolve any missing dependencies or incorrect package references.
- Commit the changes to the repository after you complete the necessary corrections.
- Trigger a new deployment in Cloud Manager and monitor the pipeline to confirm that it completes successfully.