Debugging Your Java Application using the Wrapper

The Wrapper offers some simple features which will aid you in tracking down any problems that you may be having with your application.

Requesting a Thread Dump

The Wrapper contains support for requesting that the JVM dumps out its current state. The exact contents of the information will vary depending on which JVM is being run.

Oracle JVMs will display the stack traces of all running threads to the console.

IBM JVMs provide even more useful information. The stack traces of all threads as well as object monitor states are dumped to the console. In addition, a file is created in the current directory which in addition to the information shown in the console also contains useful information about the system including all of the environment variables.

A Thread Dump can be requested on Windows systems by pressing CTRL-BREAK or on Linux systems by pressing CTRL-\. Invoking a thread dump does not affect the JVM. It will continue to run normally.

The startup for Linux and Solaris provided with the Wrapper installation launches the Wrapper in a background thread. To request a thread dump using these scripts, simply rerun the script specifying the 'dump' parameter.

Enabling Debug Logging

If the wrapper.debug property is set to TRUE, it quickly enables debug logging.

Many configuration problems can be quickly resolved by setting the log level of the console output to DEBUG. The full command used to launch Java as well as version information on the JVM being run will then be displayed in the console. See the Logging Configuration Properties section for more information.

When "include file" (cascading style) in the configuration file is being used, please enable Debug Messages. If you encounter any licensing problems, please set the wrapper.license.debug property and enable include file debugging. In combination, most configuration problems become obvious.

Detect the debugging

While the wrapper.java.detect_debug_jvm property is set to TRUE and the Debugger Detection is functioning, the Wrapper will ignore certain timeouts.