Letter rendering and Agent UI issues in AEM Forms Correspondence Management after upgrading to Java 21
In Adobe Experience Manager (AEM) Forms Correspondence Management, letter previews appear blank and the Agent UI fails to load after upgrading to AEM 6.5 LTS and Java 21. To fix this issue, configure the required JVM parameters for Java 21 compatibility and address the Agent UI template compatibility issue.
Description description
Environment
- Adobe Experience Manager (AEM) 6.5 LTS
- AEM Forms Correspondence Management
- Java 21
Symptoms
- Blank letter previews in the Create Correspondence interface
- Failures when loading the Agent UI
Cause
Missing Java Virtual Machine (JVM) parameters required for Java 21 compatibility and a known compatibility issue with the Agent UI template in certain builds cause these issues. The problems can occur in environments where AEM runs as a Windows service or another managed service because JVM parameters aren’t applied correctly unless they’re configured in the appropriate location.
Resolution resolution
Follow the steps below to resolve the issue.
-
Add the required JVM parameter for Java 21 compatibility:
- Ensure that the following JVM parameter is included when starting AEM:
--add-opens java.base/java.util=ALL-UNNAMED - For AEM running as a Windows service, add this parameter to the service configuration file, such as the service installation script or configuration utility used to manage JVM options for the service.
- For other environments, add the parameter to the JVM startup options as documented for your deployment method.
- Ensure that the following JVM parameter is included when starting AEM:
-
Restart the AEM instance to apply the updated JVM parameters.
-
Apply the latest service pack or cumulative fix pack for AEM 6.5 LTS, as the Agent UI template loading issue is resolved in newer service packs, such as AEM 6.5 LTS SP3 and later. If you’re unable to upgrade to the latest service pack, contact Adobe Support for guidance on obtaining the relevant fix.
-
Validate the resolution:
- Open the Create Correspondence interface and verify that letter previews display correctly.
- Access the Agent UI and confirm that the letter body loads as expected.
- Check that the previous errors are no longer present in the server logs and browser console.
-
For a full list of recommended Java 21 JVM parameters and upgrade steps, refer to the AEM 6.5 Forms LTS OSGi upgrade guide.