Development

An introduction to WebLogic Server Classloader Analysis Tool

Nowadays, as Java EE applications getting larger and larger, classloader issues in applications often are difficult to resolve, especially when the application uses lots of open source frameworks, which is very common in contemporary Java EE application.

Fortunately, some application servers come with tools that allow you to view the class loaders and the loaded classes. This makes our development life much easier. In WebLogic server, it is called Classloader Analysis Tool (CAT).

CAT is a web application which is automatically deployed if the server is configured in development mode. To use it, just go to http://wls-host:port/wls-cat.

After you typed in administrator user name and password, CAT will show you a tree directory in the left pane, which contains all the deployed applications and modules.

Click on one application name will navigate you to the summary of application. Every information pane has a basic view and a detailed view, showing the basic information and detailed information respectively.

Under most circumstances, what you need is the Classloader Tree. Click on the link “Classloader Tree” will show you the all the class loaders used in the application, including all the system class loaders and application class loaders.

If you are in the detailed view, it will also show the classpath of each class loader.

If you click on the hash code of a class loader, it will navigate you to the information of the class loader. Furthermore, there is a resource analyzer allowing you to type in a class name and it will analyze from where the class is loaded.

Besides viewing the class loader tree, you can also use CAT to analyze the potential conflicts of classes.

CAT is a small but powerful tool which can save lots of your time. Spend 5 minutes on it and you’ll find how useful it is.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to the Weekly Blog Digest:

Sign Up
Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram