LTS upgrade with Java21 | Community
Skip to main content
Level 2
March 4, 2026
Solved

LTS upgrade with Java21

  • March 4, 2026
  • 3 replies
  • 57 views

Hi Team,

The Adobe tool transpiler  provided a recommendation for repo analysis for java 21 upgrade as below but it causing a runtime issues in AEM LTS 6.5.1 ? Is this the recommended approach to change or will javax continued to support LTS and Cloud ?

 

Unable to resolve bundle
Missing requirement: Import-Package: jakarta.annotation ?

Best answer by VishalKa5

Hi ​@VasudevaraoGu 

 

In Adobe Experience Manager 6.5 LTS, replacing javax.annotation with jakarta.annotation is usually not required. AEM 6.5 still relies on many javax packages, so switching to jakarta can cause runtime errors like “Unable to resolve bundle – Missing requirement: Import-Package: jakarta.annotation.” The Adobe transpiler suggestion is mainly for future compatibility, especially with Adobe Experience Manager as a Cloud Service.

Key Points:

  • AEM 6.5 LTS still supports javax packages.

  • Replacing with jakarta.annotation may cause OSGi bundle resolution errors.

  • The transpiler recommendation is mainly for future/cloud compatibility.

  • For AEM 6.5 projects, it is safer to continue using javax.annotation-api unless Jakarta support is explicitly required.

Thanks,

Vishal

3 replies

VishalKa5
VishalKa5Accepted solution
Level 5
March 7, 2026

Hi ​@VasudevaraoGu 

 

In Adobe Experience Manager 6.5 LTS, replacing javax.annotation with jakarta.annotation is usually not required. AEM 6.5 still relies on many javax packages, so switching to jakarta can cause runtime errors like “Unable to resolve bundle – Missing requirement: Import-Package: jakarta.annotation.” The Adobe transpiler suggestion is mainly for future compatibility, especially with Adobe Experience Manager as a Cloud Service.

Key Points:

  • AEM 6.5 LTS still supports javax packages.

  • Replacing with jakarta.annotation may cause OSGi bundle resolution errors.

  • The transpiler recommendation is mainly for future/cloud compatibility.

  • For AEM 6.5 projects, it is safer to continue using javax.annotation-api unless Jakarta support is explicitly required.

Thanks,

Vishal

AmitVishwakarma
Community Advisor
Community Advisor
March 7, 2026

Hi ​@VasudevaraoGu 

For AEM 6.5 LTS with Java 21:

  • Yes, javax is still supported on 6.5 LTS.
  • Your runtime error
    • Unable to resolve bundle ... Missing requirement: Import-Package: jakarta.annotation happens because AEM 6.5 LTS does not export jakarta.annotation by default on the LTS SP you're on, but your bundle now imports it (because of the transpiler change).

What you should actually do

  1. For plain AEM 6.5 LTS (classic Sling Models etc., not Cloud Service):
    • Revert that dependency change and keep javax.annotation-api.
    • Revert code imports back to javax.annotation.* where the AEM runtime still expects javax (e.g. older Sling Models versions).
    • Redeploy – your bundle will resolve again.
  2. Only switch to jakarta.annotation when ALL of the following are true:
    • You are on AEM 6.5 LTS Java‑21 branch specifically prepared with the LTS transpiler, and
    • The runtime actually has a bundle exporting jakarta.annotation (e.g. jakarta.annotation-api installed and active), and
    • The relevant frameworks (like Sling Models 2.x on CS / newer stacks) are Jakarta‑aware.

Otherwise, following the transpiler blindly on 6.5 LTS SP1/SPx will break OSGi wiring exactly as you're seeing.

So for your current 6.5 LTS runtime:  Use javax.annotation + javax.annotation-api and ignore this specific transpiler suggestion for now.

Amit Vishwakarma - Adobe Commerce Champion 2025 | 16x Adobe certified | 4x Adobe SME
arunpatidar
Community Advisor
Community Advisor
March 10, 2026

@VasudevaraoGu 
javax will stay , jakarta has dependency not only on java version but jetty which will take time to be upgraded in AEM. I would recommend use javax and don’t switch to jakarta until adobe annouced deprecation on javax.

 

Arun Patidar