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/IOExceptionWithCauseClassNotFoundException: 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:
-
Edit the Import-Package section of the affected bundle to explicitly import all required
org.apache.tika.*packages, such asorg.apache.tika.io. -
Example (in
bnd.bndor equivalent):Import-Package: org.apache.tika.io, org.apache.tika.* -
Ensure the bundle does not embed its own version of Apache Tika. Rely on the platform-provided Tika bundles to avoid version conflicts.
-
Commit and deploy the updated bundle through the Cloud Manager pipeline.
-
In the AEM Web Console, verify that the custom bundle is listed as an importing bundle for
org.apache.tika.core. -
Confirm that no
NoClassDefFoundErrororClassNotFoundExceptionfor Tika classes appear in the logs. -
Validate that PDF extraction and related services start without OSGi Framework errors.