How to load classes located in Java EE app libs first, and not through Java EE App Container

We are going to use the WebSphere 8.0 application server in our development.
Our web application uses Amazon aws java sdk, which in turn uses the Apache 4.1 HTTP client.
But WebSphere also has http client classes in its libraries, which seem to interfere with the http client located in our web application.
I found the following list of http-client classes distributed using WebSphere:

\ WebSphere \ AppServer \ plugins \ com.ibm.ws.prereq.jaxrs.jar (http-client 4.0.1)
\ WebSphere \ AppServer \ runtimes \ com.ibm.jaxrs.thinclient_8.0.0.jar

So my question is: how do I first load the classes located in my application, and not through the WebSphere application container?

+6
source share
1 answer

From the Admin Console, go to:

Applications> Websphere Enterprise Applications> YourApplication> Module Management> YourModule

and change the " Class Loader Order " to the last parent .

Then restart the application.

+7
source

Source: https://habr.com/ru/post/945238/


All Articles