Tracing IBM MQ classes for Java applications
The trace facility in IBM® MQ classes for Java is provided to help IBM Support to diagnose customer issues. Various properties control the behavior of this facility.
About this task
- If the issue is easy to recreate, then collect an IBM MQ classes for Java trace by using a Java System Property. For more information, see Collecting an IBM MQ classes for Java trace by using a Java system property.
- If an application needs to run for a period of time before the issue occurs, collect an IBM MQ classes for Java trace by using the IBM MQ classes for Java configuration file. For more information, see Collecting an IBM MQ classes for Java trace by using the IBM MQ classes for Java configuration file.
![[MQ 10.0.0 June 2026]](ng10.gif)
From
IBM MQ 10.0.0, you can direct trace data directly to stdout
(standard output stream) or stderr (standard error stream) by setting the
com.ibm.msg.client.commonservices.trace.outputName property to the appropriate
value. If you are running applications in short-lived containers, this allows you to capture trace
information through container logging mechanisms, which persist beyond the container's lifetime. For
more information, see Java Standard Environment Trace stanza for Java trace. - The IBM MQ classes for Java trace mechanism can be configured to turn trace on dynamically when it finds a specific file on the file system and stop tracing when that file no longer exists. This can be very useful if IBM Support need to see a trace from an application once an issue has occurred, or if trace needs to be collected from a critical application that cannot be stopped. For more information, see Collecting an IBM MQ classes for Java trace dynamically.
If you are unsure which option to use, contact IBM Support and they will be able to advise you on the best way to collect trace for the issue you are seeing.
If a severe or unrecoverable error occurs, First Failure Support Technology (FFST) information is recorded in a file with a name of the format JAVACC
xxxx.FDC where xxxx is a
four-digit number. It is incremented to differentiate .FDC files.
- Trace is active, and
traceOutputNameis set - The FFDC directory is created as a subdirectory of the directory to which the trace file is being written.
- Trace is not active or
traceOutputNameis not set - The FFDC directory is created as a subdirectory of the current working directory.
null, which in effect turns off all the trace. If your application or application
server calls java.util.logging.LogManager.getLogManager().reset(), it closes all
trace, which might prevent you from diagnosing any problems. To avoid closing all trace, create a
LogManager class with an overridden reset() method that does
nothing, as in the following
example:package com.ibm.javaut.tests;
import java.util.logging.LogManager;
public class JmsLogManager extends LogManager {
// final shutdown hook to ensure that the trace is finally shutdown
// and that the lock file is cleaned-up
public class ShutdownHook extends Thread{
public void run(){
doReset();
}
}
public JmsLogManager(){
// add shutdown hook to ensure final cleanup
Runtime.getRuntime().addShutdownHook(new ShutdownHook());
}
public void reset() throws SecurityException {
// does nothing
}
public void doReset(){
super.reset();
}
}
java -Djava.util.logging.manager=com. mycompany.logging.LogManager ...