开发者

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开发者_JAVA技巧

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)


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".


Maybe the class you want to load does not come from an jar? Maybe it's generated on the fly? The name of the class might contain a hint ...


If the output looks like

[Loaded $Proxy2 by instance of java.lang.reflect.Proxy]

... then your classes are autogenerated

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜