INFORMIX
Informix JDBC Driver Programmer's Guide
Chapter 3: Troubleshooting
Contents Index

Debugging Your JDBC API Program

If your Java program contains JDBC API programming errors, you might want to use the debug version of Informix JDBC Driver, instead of the optimized version, to try to find where the errors occur in your program.

Using the Debug Version of the Driver

The debug version of Informix JDBC Driver, called ifxjdbc-g.jar, is exactly the same as the optimized version (called ifxjdbc.jar), except that it has been compiled with the -g option instead of the -O option.

The difference in compilation options also means that the debug version of Informix JDBC Driver has been embedded with tracing information. When you use the debug version of the driver, you can turn on tracing and get a better idea of what the JDBC API portion of your Java program is actually doing.

For instructions on how to use the debug version of Informix JDBC Driver in a Java application or Java applet, refer to "Using the Driver in an Application" or "Using the Driver in an Applet", respectively.

Turning on Tracing

Trace output consists of the following two kinds of information:

To turn on tracing, specify the environment variables TRACE, TRACEFILE, PROTOCOLTRACE, and PROTOCOLTRACEFILE in the database URL or the property list when you establish a connection to an Informix database or database server.

The following table describes the tracing environment variables.

Environment Variable Description

TRACE

Traces general information from Informix JDBC Driver.

Can be set to one of the following levels:

TRACEFILE

Specifies the full pathname of the operating system file on the client computer to which the TRACE messages are written.

PROTOCOLTRACE

Traces the SQLI protocol messages sent between your Java program and the Informix database server.

Can be set to the following levels:

PROTOCOLTRACFILE

Specifies the full pathname of the operating system file on the client computer to which the PROTOCOLTRACE messages are written.

The following example of a database URL specifies the highest level of protocol tracing and sets tracing output to the operating system file /tmp/trace.out:

For more information on establishing a connection to an Informix database or database server using a database URL or a property list, refer to "Establishing a Connection".




Informix JDBC Driver Programmer's Guide, Version 1.22
Copyright © 1998, Informix Software, Inc. All rights reserved.