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 loader viewer to examine class loaders and the classes loaded by each class loader.
This topic assumes that you have installed an application on a server supported by the product 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.
This topic also assumes that you have enabled the class loader viewer service. Click
, enable the service and restart the server.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:
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 the class loaders that load the artifacts of an application are not configured properly, the Java virtual machine (JVM) might throw a class loading exception when starting or running that 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:
Use the class loader viewer to examine class loaders and correct problems with application or class loader configurations.
If you continue to have class loader problems, refer to Class loading exceptions and to Class loading.
In this information ...Subtopics
Related concepts
Related tasks
| IBM Redbooks, demos, education, and more(Index) |