IBM Support

How to trace the initialization of the native Java API

Troubleshooting


Problem

Normal WebSphere MQ Workflow (WMQWF) Version 3.6 tracing does not trace the initial steps of the Java API initialization. The untraced steps are the profile handling and the selection of the correct configuration.

Cause

Normal WMQWF tracing using the native Java API does not start before the configuration ID for the session is defined. The initial statement in the trace is therefore the Agent.locate() call. Prior to this call it is not possible to determine the trace settings. If there are problems loading the profile or setting the configuration ID, these calls will not appear in the trace; although they are critical for correct execution.

Resolving The Problem

Set the generic JVM variable FMC_INSTANT_TRACE to TRUE or any other value to start the instant trace.

Additional information

This special trace gathers information about the very beginning of the native Java API initialization. All problems related to setting the configurationID, or retrieving the fmcrc profile will be reported in this trace.

If this variable is set, a file named FmcInstantTrace.log is written to the temp directory. If the trace criteria are set in the fmcrc file, the normal WMQWF trace will start when calling Agent.locate(). The content of the instant trace is copied to the beginning of the normal WMQWF trace. If the trace criteria is not set, no standard trace will be written and the FmcInstantTrace.log will end with the Agent.locate() call.

It is essential to set the trace variable in the correct environment. Since Java cannot access normal environment variables, the trace variable must be passed to the JVM as command line parameter. This is done using the

-D<keyword=value> option of the java command.

Starting a stand-alone appllication using the instant trace can be done with this command sequence:

java -DFMC_INSTANT_TRACE=TRUE MyWMQWFApplication

where MyWMQWFApplication is the name of the class file.

In a WebSphere Application Server environment you must set this variable in the Java VM settings of the application server. Navigate to following menu item of the administrative console: Server > Application Server > select the name of your server > Process Definition > Java Virtual Machine. Enter "-DFMC_INSTANT_TRACE=TRUE" in the Generic JVM Arguments field. Restart your application server.

Note: Use this option only in problem conditions when advised by a support person and remove the trace variable after the problem has been solved. The instant trace is written to the temp directory where it can be accessed by other people if the local security mechanism allows this. Alternatively, you can set the environment variable that defines the temp directory to point to a secured directory.

[{"Product":{"code":"SSVLA5","label":"WebSphere MQ Workflow"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"3.6","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

wmqwf mqwf

Document Information

Modified date:
15 June 2018

UID

swg21195898