Sample 6 (IDISJAV6): Call a Java batch application with the Fault Analyzer wrapper utility

The JCL in sample IDI.SIDISAM1(IDISJAV6) demonstrates how to use the Fault Analyzer Java wrapper utility to invoke a Java class with a main() method within a try-catch block. Unhandled exceptions are automatically caught and fault entries are created using the Snap.dump() method.

When you use the wrapper utility to catch unhandled Java exceptions, only a limited amount of Java information is available to Fault Analyzer:
  • The report overview includes details about the exception type and message.
  • The event list includes Java events for the active thread, including class and methods names.
  • In individual Java events, class-method variable information and stack-frame reference variable information are not available to Fault Analyzer, so they are not displayed.
See Java information reporting limitations for additional information.

See Invoking the Fault Analyzer wrapper for details about invoking the wrapper utility.

Example output from the Fault Analyzer wrapper utility

The wrapper utility reports the class being invoked and any command line arguments that were specified. For example:

Fault Analyzer Java Wrapper
Invoking class: com.example.JavaUnhandled
with args: ’[pureJavaUnhandledException]’
When FA catches an unhandled exception, the FA wrapper displays the following
messages:
Fault Analyzer was invoked to handle a Java Throwable:
.
---------------------------------------
java.lang.ClassCastException: Cannot cast class java.util.concurrent.atomic.AtomicLong to 
class java.at java.lang.Class.cast(Class.java:2614)
at com.example.JavaUnhandled.computeTheAnswer(JavaUnhandled.java:20)
at com.example.JavaUnhandled.pureJavaUnhandledException(JavaUnhandled.java:30)
at com.example.JavaUnhandled.main(JavaUnhandled.java:41)
---------------------------------------
Calling Snap.dump to create a fault entry:
DA.DCAT(F39992)
FA: Passing the exception to JVM...
...