Resolve AEM Cloud Manager deployment failures caused by custom OSGi component errors

This article describes how to troubleshoot and resolve deployment pipeline failures in Adobe Experience Manager (AEM) Cloud Manager when custom OSGi components fail to instantiate, resulting in unstable environments and unclear log messages.

Description description

Environment

Adobe Experience Manager (AEM) as a Cloud Service, deployed via Cloud Manager pipelines

Symptoms

  • Deployment pipelines fail and new deployments don’t reach a stable state.

  • Application instances restart frequently and don’t become ready.

  • Health checks fail, including the Required paths check (For example: /libs/granite/security/currentuser.json returns HTTP 503) and Required Components (custom) check reports unsatisfied components.

  • Logs show custom OSGi components failing to instantiate, with errors such as:

    • javax.jcr.nodetype.NoSuchNodeTypeException: Node type client does not exist
    • Constructor with 0 arguments not found for custom authentication or repository initializer components

Cause

Custom OSGi components fail to instantiate due to mismatched component descriptors, missing JCR node types, or incorrect factory configurations. This leads to foundational service failures and prevents successful deployment.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Review the code for custom OSGi components, such as repository initializers and authentication bundles.

  2. Ensure all referenced JCR node types (For example: client) exist before any folder creation logic executes in your custom code.

  3. Check OSGi component descriptors to verify that they match the constructor signatures in the compiled classes.

  4. Confirm that factory configurations for custom authentication components (such as ProviderConfigImpl, ProviderConfigServiceManagerImpl, OAuthManagerImpl) are correct and haven’t been newly introduced or modified in the latest deployment.

  5. Validate the health check configuration:

    • Locate the OSGi configuration for the Required Components (custom) health check (typically a factory configuration for org.apache.felix.hc.generalchecks.ComponentsCheck, tagged custom).

    • Confirm that the required component list includes the affected custom components.

    • Use the AEM Touch UI (Tools > Operations > Health Check) to review the current status and messages for the custom health check.

  6. After correcting the identified issues, redeploy the affected bundles, and verify that the environment reaches a stable ready state and all health checks pass.

recommendation-more-help
experience-cloud-kcs-help-kbarticles