Pipeline product test fails with HTTP 409 errors in AEM as a Cloud Service
This article explains how to resolve pipeline failures in Adobe Experience Manager as a Cloud Service when the productTest step fails due to a misconfigured node type for the /conf path, resulting in HTTP 409 errors.
Description description
Environment
- Adobe Experience Manager as a Cloud Service with Cloud Manager pipeline product tests
- RepoInit configuration creates or manages paths under
/conf
Issue/Symptoms
- The Cloud Manager
productTeststep fails while creating a test fixture under/conf. - The request to create
/conf/test-sitereturns HTTP409instead of201. - The Author error log contains
javax.jcr.nodetype.ConstraintViolationException: No default node type available for /conf/test-site.
Cause
A RepoInit statement may create the /conf hierarchy using nt:folder. In the reported failure, the existing parent path had no default child node type for the test to create /conf/test-site, which caused the constraint exception and HTTP 409 response. A folder hierarchy intended to contain configuration nodes should use a compatible folder node type, such as sling:Folder, for the relevant path segments.
Resolution resolution
Follow these steps to investigate a Cloud Manager productTest failure involving a path under /conf:
-
Review the failed pipeline’s Author logs. Confirm that the error is
javax.jcr.nodetype.ConstraintViolationException: No default node type available for /conf/test-siteand that the product test received HTTP409when it attempted to create the test path. -
Locate the RepoInit
RepositoryInitializerconfiguration in your project. Review the statements that create the affected/confpath and identify the node type applied to each path segment. -
If the affected path segments are intended to be folders, change the RepoInit node type from
nt:foldertosling:Folderfor those segments. In anensure nodesstatement, a node type in parentheses afterensure nodessets the default type for all path segments in that statement. Specify a different type on an individual segment when the repository structure requires it.Note: Do not replace every
nt:folderoccurrence or change unrelated/confpaths without reviewing their required node types. If the repository already contains the path with an incompatible type, verify that the deployment corrects the existing state; if the pipeline still fails, stop and contact Adobe Support rather than deleting repository content manually. -
Commit the RepoInit change and deploy it to a lower environment through Cloud Manager.
-
Rerun the Cloud Manager pipeline. Verify that the
productTeststep completes and that the test can create/conf/test-sitewithout HTTP409or the node-type exception. -
After lower-environment validation succeeds, promote the approved change to Stage and Production through the normal deployment process.