Oracle8i SQLJ Developer's Guide and Reference
Release 3 (8.1.7)

Part Number A83723-01





Go to previous page Go to beginning of chapter Go to next page

Additional SQLJ Debugging Considerations

In addition to the AuditorInstaller discussed in "AuditorInstaller Customizer for Debugging", there are other considerations to be aware of regarding debugging:

SQLJ -linemap Flag

The -linemap flag instructs SQLJ to map line numbers from a SQLJ source code file to locations in the corresponding .class file. (This will be the .class file created during compilation of the .java file generated by the SQLJ translator.) As a result of this, when Java runtime errors occur, the line number reported by the Java virtual machine (JVM) is the line number in the SQLJ source code, making it much easier to debug.

If you are using the Sun Microsystems jdb debugger, then use the -jdblinemap option instead of the -linemap option. The options are equivalent, except that -jdblinemap does some special processing, necessitated by the fact that jdb does not support Java source files with file name extensions other than the .java extension.

For more information, see "Line-Mapping to SQLJ Source File (-linemap)" and "Line-Mapping to SQLJ Source File for jdb Debugger (-jdblinemap)".


If you are translating in the server, class schema objects created during server-side translation automatically reference line numbers that map to the SQLJ source code. This is equivalent to enabling the -linemap option when you translate on a client.  

Server-Side debug Option

If you are loading SQLJ source into the server--using the server-side embedded translator to translate it--then the server-side debug option instructs the server-side compiler to output debugging information when a .sqlj or .java source file is compiled in the server. This is equivalent to using the -g option when running the standard javac compiler on a client. This does not aid in debugging your SQLJ code in particular, but aids in debugging your Java code in general.

See "Option Support in the Server Embedded Translator" for more information about this option and information about how to set options in the server.

For general information about debugging in the Oracle JServer, see the Oracle8i Java Developer's Guide.

Developing and Debugging in JDeveloper

Oracle SQLJ is fully integrated into the Oracle JDeveloper visual programming tool.

JDeveloper also includes an integrated debugger that supports SQLJ. SQLJ statements, as with standard Java statements, can be debugged in-line as your application executes. Reported line numbers map back to the line numbers in your SQLJ source code (as opposed to in the generated Java code).

See "SQLJ in JDeveloper and Other IDEs" for an introduction to JDeveloper.

Go to previous page
Go to beginning of chapter
Go to next page
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.