Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to load classes located in Java EE app libs first instead of provided by Java EE App Container

We are going to use WebSphere 8.0 app server in our development.
Our web app uses Amazon aws java sdk, that in turns uses Apache http-client 4.1.
But WebSphere also has http-client classes in its libraries that seems clash with http-client located in our web-app.
I've found next list of http-client classes distributed with 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 to load classes located in my app first instead of provided by WebSphere app container?

like image 300
Oleksandr_DJ Avatar asked May 17 '13 07:05

Oleksandr_DJ


1 Answers

From Admin Console go to:

Applications > Websphere Enterprise Applications > YourApplication > Manage Modules > YourModule

and change the "Class loader order" to parent last.

Then restart the application.

like image 145
trikelef Avatar answered Oct 18 '22 18:10

trikelef