Introduction
Many times when Policy server loads JVM it encounters error during the initialisation.
Also, some time , 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 issue what is the best way?
Environment
Policy Server Version : Any
Instructions
The easiest way to troubleshoot any JVM related issue is to capture the stdout/stacktrace from JVM call.
This can be done easily by running the policy server manually from the command prompt.
- Stop 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 initialise the JVM until it is actually 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 command prompt and say access a resource protected by custom java authenticaiton scheme.
smps.log:
console:
So, here as we can see we got more meaningful message indicating that enough heap space couldn't be allocated as per the -Xms configuration in the JVMOptions.txt.
Additional Information