Resolve blank Letters preview in AEM 6.5 LTS on Java 17 or 21
This article describes how to resolve an issue where the Letters preview in AEM Forms appears blank after migrating to AEM 6.5 LTS and running on Java 17 or 21. The solution involves updating JVM options to allow necessary module access.
Description description
Environment
- Adobe Experience Manager (AEM) 6.5 LTS
- Java 17 or Java 21
Issue/Symptoms
When previewing letter templates in the Create Correspondence interface, the screen appears blank. This issue does not affect Forms or Documents previews and was not present on Java 8 or 11. Server logs may show errors such as java.lang.reflect.InaccessibleObjectException: Unable to make field private transient java.util.NavigableMap java.util.TreeSet.m accessible: module java.base does not "opens java.util" to unnamed module.
Cause
Starting with Java 17, strong module encapsulation restricts reflective access required by the Correspondence Management module, resulting in the blank preview.
Resolution resolution
To fix the blank Letters preview issue, follow these steps:
-
Locate the script or configuration file that sets JVM options for your AEM Windows service. For Windows installations, this is typically the
instsrv.batfile in your AEM installation directory. -
Open the file and find the line that sets JVM options (often starting with
set jvm_options=). Options are usually separated by#characters. -
Add the following JVM argument to the options list:
--add-opens=java.base/java.util=ALL-UNNAMED- Example:
set jvm_options=-Xmx2048m#--add-opens=java.base/java.util=ALL-UNNAMED#
- Example:
-
Save the changes to the file.
-
Reinstall the AEM Windows service to apply the updated JVM options:
- Open an Administrator command prompt and navigate to the directory containing the service scripts.
- Stop the AEM service using:
net stop [ YourAEMServiceName] - Uninstall the service:
instsrv.bat -uninstall [ YourAEMServiceName] - Reinstall the service:
instsrv.bat [ YourAEMServiceName] - Start the service:
net start [ YourAEMServiceName]
-
After the service restarts, log in to AEM and attempt to preview a letter in the Create Correspondence interface. The letter should now render correctly.
-
(Recommended) Review Adobe’s official documentation for the full set of recommended Java 21
--add-opensoptions for AEM 6.5 LTS to ensure compatibility with all features.