I'm running SiteMinder Policy Server 6 SP5 on Windows and Active Expressions fail due to error 'SmJavaAPI: Unable to get a JVM environment'
Snippet of profiler:
[04/03/2008][16:16:52.711][Leave function CSmActiveExprLibrary::GetActiveValue][SmActiveExpr.cpp:870][CSmActiveExprLibrary::GetActiveValue] [Active expression 'GetActiveAttr;smjavaapi;JavaActiveExpression; com.netegrity.scriptevaluation.scriptactiveexpression. ActiveScript ((passwordHints=="") || (passwordHints==null) )' failed with error 'SmJavaAPI: Unable to get a JVM environment']
This is a problem between the Microsoft OS Memory management and the JVM.
The JVM needs to have contiguous memory and this is sometimes not possible if memory is fragmented after installing the Microsoft Patch MS06-040 because it changes how memory is handled. This issue is not easily reproduced because it depends on the memory configuration of the system.
This Microsoft link shows which security patch caused this issue and discusses a patch, only obtained by calling Microsoft support, which fixes the issue:
Programs that request lots of contiguous memory may fail after you install security update 921883 (MS06-040) on a Windows Server 2003 Service Pack 1-based computer.
The problem is that the patch is called 283625_ENU_i386_zip.exe. It is a self extracting zip that is why it is a .exe file extension. It unzips to be a file called WindowsServer2003-KB924054-x86-ENU.exe and is password protected so can not be unzipped without the password from Microsoft.
This file name is the same for both Windows 2003 SP1 and SP2. The fix the customer has to apply to fix this is for SP2. Make sure the file is the correct SP2 version or else the problem will persist.
Please add a line to your <SM>\config\JVMOptions.txt with the "-Xmx" and the "-Xms" options, which sets the maximum heap size and startign heap size. Follow it by a number that does not exceed the available physical memory available at the time. For example, use: "-Xmx256M" to limit the JVM heap size to 256MB.
Note: This value should be set between 128-256 to fix the issue. Making this number larger only exasperates the issue.
Example of the top of a modified jvmoptions.txt file:
This solution is a possible workaround and is not guaranteed to work. Customer may need to follow-up this issue with Microsoft.