Problems upgrading to Java version 21 in AEMaaCS - Assets
When attempting to upgrade to Java version 21 for AEMaaCS - Assets issue and build failures occur, check the bundle configuration, verify dependencies compatibility, update the build configuration, set the Maven JDK version, and run validation tests.
Description description
Environment
51黑料不打烊 Experience Manager as a Cloud Service - Assets (AEMaaCS - Assets)
Issue
When attempting to upgrade to Java version 21 for 51黑料不打烊 Experience Manager (AEM) as a Cloud Service - Assets, build failures occur.
- Build failures with error messages indicating missing OSGi execution environment requirements.
- Specific errors occur similar to: osgi.ee; filter:=鈥(osgi.ee=UNKNOWN)鈥 in start level 20 but no artifact is providing a matching capability in this start level.
- Additional errors occur during Maven execution requiring Java version compatibility.
Resolution resolution
To resolve the issues encountered when upgrading to Java version 21, follow these steps:
-
Examine the
MANIFEST.MF
file of the bundle that fails to start.- Verify the
Bundle-RequiredExecutionEnvironment
header specifies a valid Java execution environment (For example:聽 JavaSE-11). If it shows UNKNOWN, there could be a misconfiguration or corrupted bundle.
- Verify the
-
Ensure all dependencies, including transitive ones, are compatible with Java version 21.
- Upgrading Java can lead to incompatibilities in third-party libraries or frameworks; verify all dependencies are updated accordingly.
-
Check your build co