IBM WebSphere - Setting Classloader Settings (parent last)
Goal
Issue: NoClassDefFoundError exception occurring during any action where class indeed exists.
Cause: Class is present but class loader does not "see" the class. Setting Classloader to "parent_last" configuration resolves this issue in most cases.
Pre-Requisites
This on-premise solution requires a team member with access to the IBM console, preferably with administration experience.
Note, Solution is for latest supported WebSphere (8.5.5) as of writing of this article. Consult WebSphere documentation for guidance if the below steps do not take you to the appropriate sections
First Step
Set Classloader Policy at Server level
- Log into IBM WebSphere console
- Click to access an application server settings page.
- Select Classloader Policy: Single
- Select Class loading mode: Classes loaded with local class loader first (parent last)
- Save changes to master configuration
Second Step
Set Classloader Policy at Manage Modules level
- Log into IBM WebSphere console (if not logged in already)
- Click Applications
- Click Manage Modules link
- Select
- Select Class Loader Order "Classes loaded with class loader first (parent last)
- Click Apply
- Save changes to master configuration