WebSphere Application Server - Express, Version 6.0.x     Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Troubleshooting class loaders

Class loaders find and load class files. For a deployed application to run properly, the class loaders that affect the application and its modules must be configured so that the application can find the files and resources that it needs. Diagnosing problems with class loaders can be complicated and time-consuming. To diagnose and fix the problems more quickly, use the administrative console Class Load Viewer to examine class loaders and the classes loaded by each class loader.

Before you begin

This article assumes that you have installed an application on a server supported by WebSphere Application Server and you want to examine class loaders used by the application or its modules. The modules can be Web modules (.war files) or enterprise bean (EJB) modules (.jar files). The Class Loader Viewer enables you to examine class loaders in a runtime environment.

Why and when to perform this task

The runtime environment of WebSphere Application Server uses the following class loaders to find and load new classes for an application in the following order:

  1. The bootstrap, extensions, and CLASSPATH class loaders created by the Java virtual machine
  2. A WebSphere extensions class loader
  3. One or more application module class loaders that load elements of enterprise applications running in the server
  4. Zero or more Web module class loaders
Class loader hierarchy

Each class loader is a child of the previous class loader. That is, the application module class loaders are children of the WebSphere extensions class loader, which is a child of the CLASSPATH Java class loader. Whenever a class needs to be loaded, the class loader usually delegates the request to its parent class loader. If none of the parent class loaders can find the class, the original class loader attempts to load the class. Requests can only go to a parent class loader; they cannot go to a child class loader. After a class is loaded by a class loader, any new classes that it tries to load reuse the same class loader or go up the precedence list until the class is found.

If class loaders that affect an application and its modules are not configured properly, the application might not run or an exception might result when deploying or attempting to run the application. Class loading exceptions describes the types of exceptions caused by improperly configured class loaders and suggests ways to use the Class Loader Viewer to correct configurations of class loaders. The types of exceptions include:

The steps that follow describe generally how to use the Class Loader Viewer to examine class loaders and correct problems with application or class loader configurations.

Restriction: The Class Loader Viewer is not available on the J9 Java virtual machine, which includes the AMD 64-bit platforms.

Steps for this task (dependent on configuration)

What to do next

If you continue to have class loader problems, refer to Class loading exceptions and to Class loading.



Sub-topics
Class loading exceptions
Enterprise application topology
Class loader viewer settings
Search settings

Related concepts
Class loaders

Related tasks
Class loading
Configuring Web module class loaders
Diagnosing problems (using diagnosis tools)

Task topic    

Terms of Use | Feedback

Last updated: Jun 8, 2005 12:45:23 PM EDT
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/ttrb_classload_viewer.html

© Copyright IBM Corporation 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)