IBM Support

Using the Java -Verbose Option to Determine Where JDBC Driver Classes are Loading

Troubleshooting


Problem

The java -verbose option can be used to debug class loading issues. This can be helpful when there is uncertainty about what copy of a JDBC driver is being loaded.

Resolving The Problem

Verbose is an option that can be used on the Java command to enable debug output for class loading. By default, this debug output is not enabled. This option can be used to determine what location the JDBC driver classes (and any/all other classes) are being loaded from.

Note: With the toolbox driver (jt400.jar), the -verbose option should be used when there is doubt about the version of JDBC driver in use when the actual classpath in use is unknown.

If you run a class specifying the -verbose command-line option, you will get an output that looks similar to the following:

java -verbose HelloWorld                                                                    
Finding native method library: QSYS QJVIO14                                                
Finding native method library: QSYS QJVAUSL                                                
Loading class com.ibm.as400.system.MIPtr from /QIBM/ProdData/OS400/Java400/ext/IBMmisc.jar  
Loading class java.lang.Void from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar              
Loading class java.lang.Byte from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar              
Loading class java.lang.Character from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar          
Loading class java.lang.Double from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar            
Loading class java.lang.Integer from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar            
Loading class java.lang.Short from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar              
Loading class java.lang.Boolean from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar            
Loading class sun.misc.Resource from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar            
Loading class java.net.URL from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar                
Loading class java.net.URLStreamHandler from /QIBM/ProdData/OS400/Java400/jdk/lib/rt.jar  

Note: The example is just partial output, since the entire list is very long.

-verbose (-v) can be used on the java command, in other words, java -verbose HelloWorld.

Verbose can also be set on as an option for WebSphere (any version), and is generally found as an option that can be checked in the Administration Console. It will be found in a location such as Servers > Application Servers > server_name > Process Definition > Java Virtual Machine, although this may vary on different versions of WAS and on different platforms.

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Data Access","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Historical Number

430499283

Document Information

More support for:
IBM i

Software version:
Version Independent

Operating system(s):
IBM i

Document number:
637165

Modified date:
18 December 2019

UID

nas8N1014705

Manage My Notification Subscriptions