MustGather: Classloader problems for WebSphere Application Server
 Technote (troubleshooting)
 
Problem(Abstract)
Collecting data for problems with the IBM® WebSphere® Application Server Classloader component. Gathering this information before calling IBM support helps familiarize you with the troubleshooting process and saves you time.
 
Resolving the problem

1. Learning more 2. Troubleshooting 3. Collecting data 4. Analyzing data


If you already contacted support, continue to the component-specific MustGather information. Otherwise, click: MustGather: Read first for all WebSphere Application Server products.

Collecting Classloader specific MustGather information
This technote explains the information needed to better understand when WebSphere Application Server fails to load classes or resources. If you are receiving one of the following common classloader errors or exceptions, you will need to gather the following version specific information:
  • ClassNotFoundException
  • NoClassDefFoundError
  • ClassCastException
    Application code diagnostics ClassCastExceptions:
    Modify client code to output the classloader of cast target class, the classloader of the cast source object class, and the context classloader immediately before the point of failure. Example code is below:
    // For a cast such as "(TargetClass)sourceObject", add the
    // following lines before the cast statement:
    ClassLoader ctxCL = Thread.currentThread().getContextClassLoader();
    ClassLoader tcCL = TargetClass.class.getClassLoader();
    ClassLoader soCL = sourceObject.getClass().getClassLoader();
    System.out.println("ctxCl=" + ctxCL);
    System.out.println("tcCl=" + tcCL);
    System.out.println("soCl=" + soCL);
  • UnsatisfiedLinkError

This document is split up into two sections, depending on your version of Application Server:
WebSphere Application Server V6.0 and V6.1 specific information
Perform the following steps:
  1. Enable classloader tracing using the following string:

    com.ibm.ws.classloader.*=all

    For details, see How to set up a trace.


  2. Enable Java™ Virtual Machine (JVM) classloader and bootstrap traces through the administrative console for Version 6.0:
    1. Expand Servers, choose Application servers and select the problem server.

    2. On right side, under Server Infrastructure expand Java and Process Management.

    3. Click Process Definition.

    4. Under Additional Properties, select Java Virtual Machine.

      Enable the following Properties by selecting the check boxes on the left of the property.
      • Verbose class loading
      • Verbose JNI

    5. Click Apply.

    6. On right side, under Additional Properties click Custom Properties.

    7. Click New.

    8. Enter the following custom property:
      • Name: ws.ext.debug
      • Value: true

    9. Click OK.

  3. Save the changes.

  4. Restart the server.

  5. Recreate the classloader issue.

  6. Run the collector tool against the problem profile:
  7. Send us the Enterprise Application and the collector output.

  8. Follow instructions to send diagnostic information to IBM support.

WebSphere Application Server V5.0 and V5.1 specific information
Perform the following steps:
  1. Enable classloader tracing using the following string:

    com.ibm.ws.classloader.*=all=enabled

    For details, see Steps for enabling traces.

  2. Enable Java Virtual Machine (JVM) classloader and bootstrap traces through the administrative console for V5.0 and V5.1:
    1. Expand Servers, choose Application servers and select the problem server.

    2. Under Additional Properties, click Process Definition.

    3. Under Additional Properties, select Java Virtual Machine.

      Enable the following Properties by selecting the check boxes on the left of the property.
      • Verbose class loading
      • Verbose JNI

    4. Click Apply.

    5. Under Additional Properties click on Custom Properties.

    6. Click New.

    7. Enter the following custom property:
      • Name: was.ext.debug
      • Value: true

    8. Click OK.

  3. Save the changes.

  4. Restart the server.

  5. Recreate the classloader issue.

  6. Run the collector tool:
  7. Send us the Enterprise Application and the collector output.

  8. Follow instructions to send diagnostic information to IBM support.

What to do next
Once you have collected the preceding information, you can begin Analyzing the data or simply send the diagnostic information to IBM support.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers WebSphere Application Server - Express AIX, HP-UX, Linux, Solaris, Windows 6.1, 6.0, 5.1, 5.0
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Classloader
Operating system(s): Windows
Software version: 6.1
Software edition:
Reference #: 1196187
IBM Group: Software Group
Modified date: Apr 20, 2007