AEM Cloud Manager deployment fails due to missing Apache Tika package imports

This article describes how to address deployment pipeline failures in Adobe Experience Manager Cloud Manager environments that are caused by missing Apache Tika package imports in custom application bundles.

Description description

Environment

  • Adobe Experience Manager (AEM) as a Cloud Service
  • Cloud Manager

Issue/Symptoms

  • The deployment pipeline fails in the QA environment during the deploy step.

  • All previous pipeline steps (build, code quality, image build, transform job, and index updates) complete successfully.

  • The deployment fails with an error indicating that containers are not ready.

  • AEM publish logs show repeated OSGi Framework errors related to PDF extraction functionality, such as:

    • NoClassDefFoundError: org/apache/tika/io/IOExceptionWithCause
    • ClassNotFoundException: org.apache.tika.io.IOExceptionWithCause not found
  • The platform-provided Apache Tika bundles (org.apache.tika.core, org.apache.tika.parsers) are present and active.

  • The custom application bundle does not import the required org.apache.tika.* packages, resulting in class-loading failures when referencing Tika classes.

  • The issue is reproducible on every pipeline execution for the affected environment.

Cause

The deployment pipeline fails because the custom application bundle does not import the required Apache Tika packages, resulting in class-loading errors during service startup.

Resolution resolution

To fix the deployment failure caused by missing Apache Tika package imports, follow these steps:

  1. Edit the Import-Package section of the affected bundle to explicitly import all required org.apache.tika.* packages, such as org.apache.tika.io.

  2. Example (in bnd.bnd or equivalent):

    Import-Package: org.apache.tika.io, org.apache.tika.*

  3. Ensure the bundle does not embed its own version of Apache Tika. Rely on the platform-provided Tika bundles to avoid version conflicts.

  4. Commit and deploy the updated bundle through the Cloud Manager pipeline.

  5. In the AEM Web Console, verify that the custom bundle is listed as an importing bundle for org.apache.tika.core.

  6. Confirm that no NoClassDefFoundError or ClassNotFoundException for Tika classes appear in the logs.

  7. Validate that PDF extraction and related services start without OSGi Framework errors.

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