PSM HTML5 Gateway Sessions Fail with Error PSMGW1000E due to Java IllegalAccessError

PSM HTML5 Gateway Sessions Fail with Error PSMGW1000E due to Java IllegalAccessError

174
Created On 11/10/26 11:01 AM - Last Modified 11/10/26 16:08 PM


Symptom


Users connecting to targets via the PSM HTML5 Gateway experience an immediate connection failure with the following generic error displayed in the PVWA UI:

PSMGW1000E - Failed to connect to the PSM Server.

Standard PSM sessions (via RDP file download) work fine, and the HTML5 Gateway health check (/guac/health) reports a healthy status. Network connectivity and port 3389 are confirmed to be open.

Upon reviewing the Tomcat logs (cyberark-psm-gateway-tomcat.log or catalina.out) on the HTML5 Gateway server, a fatal Java exception is observed at the exact timestamp of the connection attempt:

java.lang.IllegalAccessError: class com.cyberark.psmgw.utils.CAPSMGWServletUtils (in unnamed module @0x[...]) cannot access class com.sun.org.apache.xerces.internal.impl.dv.util.HexBin (in module java.xml) because module java.xml does not export com.sun.org.apache.xerces.internal.impl.dv.util to unnamed module @0x[...]

at com.cyberark.psmgw.utils.CAPSMGWServletUtils.getHashedPSMSessionUUID(CAPSMGWServletUtils.java:95)

...



Environment


14.6 Privileged Access Manager (PAM, self-hosted) PSM
  • Privileged Access Manager (PAM) Self-Hosted
  • PSM HTML5 Gateway (Tomcat deployment)
  • Java Runtime Environment (JRE/JDK) Version 16 or newer (e.g., Java 17)
  • Linux Operating System (RHEL, CentOS, Ubuntu, etc.)


Cause


Modern Java versions (Java 16 and above) enforce strict module encapsulation by default. The JVM actively blocks applications from accessing internal APIs unless explicitly permitted.

During session initialization, the Idira HTML5 Gateway web application relies on an internal Java class (HexBin within the java.xml module) to generate a hashed session UUID. Because the newer JVM blocks access to this internal class, the servlet crashes, dropping the connection and throwing the generic PSMGW1000E error to the frontend.



Resolution


To resolve this issue, you must instruct the Tomcat server's JVM to explicitly allow the HTML5 Gateway application access to the required java.xml module by passing the --add-exports flag during startup.

Step-by-Step Instructions:

  1. Log in to the HTML5 Gateway server as root or a user with sudo privileges.
  2. Locate or create the Tomcat environment configuration file. The standard and recommended location is /opt/tomcat/bin/setenv.sh. (Note: Depending on your OS and Tomcat installation method, this might also be configured in /etc/tomcat/tomcat.conf or /etc/sysconfig/tomcat).
  3. Add the following JVM argument to the CATALINA_OPTS variable: export CATALINA_OPTS="$CATALINA_OPTS --add-exports=java.xml/com.sun.org.apache.xerces.internal.impl.dv.util=ALL-UNNAMED"
  4. If you created a new setenv.sh file, ensure it has the correct ownership and execution permissions for the Tomcat service account (typically tomcat or psmgw): chown tomcat:tomcat /opt/tomcat/bin/setenv.sh chmod +x /opt/tomcat/bin/setenv.sh
  5. Restart the Tomcat service to apply the new JVM arguments: systemctl restart tomcat
  6. Test a new PSM session through the HTML5 Gateway. The IllegalAccessError will no longer occur.

(Note: If you subsequently receive a PSMGW0001E error after applying this fix, the Java issue is resolved, but you are now encountering a separate certificate trust issue between the HTML5 Gateway and the PSM server. Verify your SSL certificate chains and SANs).

 



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001U7NCAU&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail