开发者

Any tool to view the picture of class loader tree?

开发者 https://www.devze.com 2022-12-10 18:38 出处:网络
Say I\'m debugging some weird class loading issues of an application deployed inside of a Java EE app server. By some reason it appears, that I have duplicate jars on the class paths of two classloade

Say I'm debugging some weird class loading issues of an application deployed inside of a Java EE app server. By some reason it appears, that I have duplicate jars on the class paths of two classloaders (2 different EAR classloaders), and the classes fro开发者_开发问答m namespaces of these class loaders need to colaborate.

So the question is following: does exist any tool which can show an image (picture) of class loader tree together with the repository of each class loader? Of course, it's not of big importance to show exactly a picture, if it could be some kind of a dynamic user interface (i.e. like Windows Explorer tree folding/unfolding), I would be very happy.

UPD: I'm using JBoss 5.1.

Thanks


In JBoss you can log all classloader events, which should tell you precisely where your conflicting classes are, if you can sift through the verbosity.

Or you can go to the jmx-console, find the jboss.classloader section, find the entry for your ear (something like id="vfszip:/apps/jboss-5.1.0.GA/server/default/deploy/your.war/") and invoke findClassLoaderForClass for the class that's giving you problems.


Which app server are you using?

  • WebSphere has one you can download from herelink text
  • NetWeaver has one in the administrator console

Other than these, don't think such tool exists.

0

精彩评论

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