简体   繁体   中英

WebSphere LibertyCore Class loader looking for wrong class

2 applications (A, B)are deployed on my server LibertyServer. Both contain the "esapi-2.0.1" library. my server.xml follows:

<library apiTypeVisibility="spec,ibm,api,ibm-spi,third-paty" id="extA">
<fileset dir ="apps/web/A/extA" includes=*.jar"/>
</library>

<enterpriseApplication location="A.ear" name="A">
<classloader privateLibraryRef="extA" apiTypeVisibility="spec,ibm,api,ibm-spi,third-paty/>
</enterpriseApplication>

Now if I try to start the server,B look for the SecurityConfiguration class in the "org.opensaml" package contained in the dependencies of A. If I try to delete the

<enterpriseApplication> 

tag from server.xml, application B works correctly. How can I make sure that the two applications can coexist without any conflict?

It isn't clear from your question specifically what the conflict is that you are wanting to avoid, however, you do have some syntax errors in the configuration,

apiTypeVisibility="spec,ibm,api,ibm-spi,third-paty/>

is missing the end quote and has misspellings of third-party and ibm-api . It should be:

apiTypeVisibility="spec,ibm-api,ibm-spi,third-party"/>

You also have the same misspellings of third-party and ibm-api in,

<library apiTypeVisibility="spec,ibm,api,ibm-spi,third-paty" id="extA">

If fixing the syntax errors doesn't resolve the issue you are seeing, I'd recommend posting error message and full exception stacks along with the corrected configuration.

You will also want to be aware that with privateLibraryRef, you will have different class loaders loading the library classes for each application. If it's important to share a single class loader, use commonLibraryRef instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM