I am currently facing an interesting problem where our application fails to start up on 3/4 nodes due to classloading issues.
The problem seems to be that WAS is loading b.jar before a.jar. After troubleshooting more, I found that all of the nodes load the jars in different orders (via Classpath viewer in console) and the working node may have just been a fluke.
How does WebSphere determine the classloading order within an installed applications WEB-INF/lib folder?
Order of loading jars is undefined in websphere. To solve your problem I can suggest you to use one of the below option.
Use manifest classpath settings by mentioning the jar names in a order like how you want them to be loaded.
OR
You can extract the classes from a.jar and put it in the WEB-INF/classes directory. Then remove a.jar from the lib folder. Because classes directory will be loaded before lib directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With