Solving problems

If a program does not complete successfully, run the installation verification program, which is described in Running the point-to-point IVT, and follow the advice given in the diagnostic messages.

Tracing programs

The WebSphere MQ JMS trace facility is provided to help IBM(R) staff to diagnose customer problems.

Trace is disabled by default, because the output rapidly becomes large, and is unlikely to be of use in normal circumstances.

If you are asked to provide trace output, enable it by setting the Java(TM) property MQJMS_TRACE_LEVEL to one of the following values:

on
traces WebSphere MQ JMS calls only
base
traces both WebSphere MQ JMS calls and the underlying WebSphere MQ base Java calls

For example:

java -Djava.library.path=library_path
     -DMQJMS_TRACE_LEVEL=base MyJMSProg
where library_path is the path to the WebSphere MQ Java libraries

(see The WebSphere MQ Java libraries).

To disable trace, set MQJMS_TRACE_LEVEL to off.

By default, trace is output to a file named mqjms.trc in the current working directory. You can redirect it to a different directory by using the Java property MQJMS_TRACE_DIR. For example:

java -Djava.library.path=library_path
     -DMQJMS_TRACE_LEVEL=base -DMQJMS_TRACE_DIR=/somepath/tracedir MyJMSProg

Logging

The WebSphere MQ JMS log facility is provided to report serious problems, particularly those that might indicate configuration errors rather than programming errors. By default, log output is sent to the System.err stream, which usually appears on the stderr of the console in which the JVM is run.

You can redirect the output to a file by using a Java property that specifies the new location, for example:

java -Djava.library.path=library_path
     -DMQJMS_LOG_DIR=/mydir/forlogs MyJMSProg
where library_path is the path to the WebSphere MQ Java libraries

(see The WebSphere MQ Java libraries).

When the log is redirected to a file, it is output in a binary form. To view the log, the utility formatLog (formatLog.bat on Windows systems) is provided, which converts the file to plain text format. The utility is stored in the bin directory of your WebSphere MQ JMS installation. Run the conversion as follows:

formatLog <inputfile> <outputfile>