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.
Historical Number
430499283
Was this topic helpful?
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