IBM Support

Mustgather: Setup for diagnosing a Java Exception on AIX®, Linux, Windows and z/OS®

Troubleshooting


Problem

If your Java application throws a Java Exception on any one of the operating systems such as AIX® , Linux, Windows and z/OS® , there are a number of diagnostic data files that are useful for diagnosing the problem. This mustgather document describes about the required settings to be in place in order to generate those diagnostic data files.

Resolving The Problem

In order to collect the diagnostic data files required for diagnosing the Java exceptions, check that the following specific settings are configured before running your application:
  1. Enable javacore generation
  2. Enable core dump generation

Please note that both the javacore and core dump generation can be enabled using the below single Xdump option:

-Xdump:java+system:events=throw+systhrow,range=1..2,filter=<Exception with full path>#<top-most method in the exception call-stack>*
NOTE: With Java 8 and later releases, the "msg_filter" option can be used as a filter on text string within an exception message, to reduce the number of dump files generated. This option is supported only for the following events: throw, catch, systhrow, and uncaught.
-Xdump:java+system:events=throw+systhrow,range=1..2,filter=<Exception with full path>,msg_filter=<Text string in exception message>

Please note that the suboption "range" is set to "1..2" in order to generate two sets of dumps in the event of Java exception. For example:

-Xdump:java+system:events=throw+systhrow,range=1..2,filter=com/foo/MyException#com/foo/bar/ThrowingClass.ThrowingMethod*,msg_filter=*wrong initializer*


Java exception to be diagnosed - com/foo/MyException
Stack top method - com/foo/bar/ThrowingClass.ThrowingMethod*
Text string in exception message - *wrong initializer*

For more details about enabling these settings, please see the related information links.

[{"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"General","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"8.0;7.1;7.0;6.1;6.0;5.0","Edition":"J2SE","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
23 July 2020

UID

swg21588003