Many times when the Policy server loads JVM it encounters an error during the initialization.
Also, sometimes, while invoking the custom Java code like custom authentication scheme /custom java active expression, the Policy server doesn't evaluate or load them properly and errors out.
To troubleshoot such JVM related issues what is the best way?
Policy Server Version : Any
Instructions
The easiest way to troubleshoot any JVM-related issue is to capture the stdout/stack trace from JVM call.
This can be done easily by running the policy server manually from the command prompt.
Stop the Policy server running process.
Open a command prompt in the <policyserver_install_directory>/bin directory.
Execute command: smpolicysrv.exe
Then, recreate the problem.
You should now see the stack trace from JVM in the console.
Note :
Policy server does NOT initialize the JVM until it is needed. So you wont' be seeing any JVM related message until actually any java code is invoked by Policy server.
Testing:
1: Change the JVMOptions.txt and include the following :
-Xms2048m
-Xmx2048m
Then, start the policy server from the command prompt and say access a resource protected by a custom java authentication scheme.
smps.log:
Console
So, here as we can see we got a more meaningful message indicating that enough heap space couldn't be allocated as per the -Xms configuration in the JVMOptions.txt