IBM Support

MustGather: Classloader problems for WebSphere Application Server Liberty

Troubleshooting


Problem

The following MustGather will assist you in setting up the traces and collecting the data required to analyze a classloader issue.

Resolving The Problem

Tab navigation

Collecting data for problems with the IBM® WebSphere® Application Server Liberty Profile classloader component. Gathering this MustGather information before calling IBM support will help you understand the problem and save time analyzing the data

This MustGather is needed to analyze exceptions such as: ClassNotFoundException, NoClassDefFoundError, ClassCastException, NoSuchMethodError, LinkageError, UnsatisfiedLinkError, VerifyError, UnsupportedClassVersionError, IncompatibleClassChangeError, ClassFormatError.

Collecting data manually

NOTE: Please see the following link for instructions to set classloader tracing on Websphere Traditional: MustGather: Classloader problems for WebSphere Application Server

Ensure that you complete all the steps as written, especially generating the server dump

  1. Open your server.xml file located within the <LIBERTY_HOME>/usr/servers/<server name>/ directory.

  2. Add the following <logging> element:
    <logging traceSpecification="ClassLoadingService=all:SharedLibrary=all" traceFileName="trace.log" maxFileSize="100" maxFiles="10" traceFormat="BASIC"/> 

  3.  If you do not have a jvm.options file within the <LIBERTY_HOME>/usr/servers/<server name>/ directory, create one.

  4. Add the following line to the first line of the jvm.options file:
    -verbose:class

  5. Backup and clear old log files within <LIBERTY_HOME>/usr/servers/<server name>/logs directory

  6. Stop the application server then start the server with the following parameter added
    server start <SERVER_NAME> --clean
    Note: For Liberty running in a containerized environment, the --clean option to start the server may be ineffective and can be omitted. If you are using Liberty Operator, then use the following day2-operations to enable the trace:
    https://www.ibm.com/docs/en/was-liberty/base?topic=resources-webspherelibertytrace-custom-resource  

  7. Recreate the issue.

  8. Run the following command from the bin directory:
    server dump <SERVER_NAME>
    (this will create a compressed file .zip in the /usr/servers/<SERVER_NAME/ directory)
    Note:Ensure the liberty server is running before using the server dump command.

  9. Send the .zip file created from step 8 to IBM: Exchanging information with IBM support.  

 

Additional Notes

If you know the package you are experiencing issues with, you can enable classloading tracing for a specific package by changing the trace specification to:

             com.ibm.ws.class.load.%packagename%.*=all

     Example Usage:

             com.ibm.ws.class.load.org.apache.cxf.*=all

For OSGI Bundle-related issues, run the following command:

server dump server_name

 

Related information

Setting up trace and getting a full dump in the WebSphere Application Server V8.5 Liberty profile

[{"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":"All Editions","Line of Business":{"code":"LOB67","label":"IT Automation \u0026 App Modernization"}}]

Document Information

Modified date:
18 April 2024

UID

swg21972177