Search code examples
javawebsphereverbose

java -verbose does not give a file location for every class


We are trying to debug some mean classloader issues with our WAS (Websphere Application Server) instance.

For this we provided the option -verbose:class in order to see which class WAS is loading where from.

For most classes we get output like

Loading class <some class> from <some jar file>

But for some classes (including the one causing problems) only

Loading class <some class>

gets printed.

Where is do these come from? Get they loaded straight from hell or why is IBM protecting their real identity?

Update: The class we are looking for is javax.xml.ws.Service which should really come from a rt.jar (we are getting a java.lang.VerifyError on it)


Solution

  • If you are interested in which files are read by the JVM, you could use operating system tools like strace, dtrace, or lsof to observe the files read by a process. Though that won't tell you which classes where loaded from that file.

    Are you aware of the IBM JDK Diagnostics Guide? It contains a chapter "Class-loader diagnostics".