Jump to content

HP-UX Java, -XX:+HeapDumpOnOutOfMemoryError Not Working

  • PrintPrint
ISSUE:
Oracle suggests to add the -XX:+HeapDumpOnOutOfMemoryError Java option for their Business Suite application. This can be done by adding the option in the jserv.properties file.
The Java version used is 1.5.0.12, and according to the documentation, this option should work. But when trying to start the application, the following error appears:
Unrecognized VM option '+HeapDumpOnOutOfMemoryError' Could not create the Java virtual machine.
SOLUTION:
There is nothing wrong with Java 1.5.0.12 and the previously mentioned option.
You look at the Java version under /opt/java1.5 ,which is really 1.5.0.12, and if you run a test with the option against it, it works fine as shown below:
$/opt/java1.5/bin/java -XX:+HeapDumpOnOutOfMemoryError -version    java version "1.5.0.12"    .......
The issue is that Oracle Business Suite bundles Java under the hood that is not necessarily the latest version, in this case the version is 1.5.0.02, and this option is not introduced until 1.5.0.04.
The following is based on the Java 1.5.0.04 Release Notes:
-XX:+HeapDumpOnOutOfMemoryError The HeapDumpOnOutOfMemory command line option causes the JVM to dump a snapshot of the Java heap when an Out Of Memory error condition has been reached. The HeapDumpOnOutOfMemoryError functionality is available with SDK 1.4.2.11 and JDK 1.5.0.04.
As a general advise, when an application: Oracle, BEA WebLogic, IBM WebSphere, or any other application that bundles Java under the hood, gives a Java error, do not assume that the error comes from Java's default location under /opt, you need to look at the Java location that the application is using.
As a hint, use:
$ps -efx|grep java
This provides the exact directory of the Java executable.

HP Support forums

Find solutions and collaborate with others on the HP Support Forum
HP.comHP on FacebookHP on TwitterHP on YouTubeHP on Linked InHP on FlickrHP on Google+