I'm trying to develop a WAS administrative client program and deploy it on WLP. A web application will use the com.ibm.websphere.management.AdminClient class to interact with WAS Job Manager and Dmgr.
A simple standalone java program works correctly (e.g. the one described here in the InfoCenter). However, there are many conflicts when I try to integrate it with the web application and deploy on WLP. I used the com.ibm.ws.admin.client_8.5.0.jar library and the following features:
The class not found exceptions refer to the classes and libraries located under java_1.7_64(IBM)\jre\lib\:
rt.jar -> e.g. HostnameVerifier.class
xml.jar -> e.g. DocumentBuilderFactoryImpl.class, Node.class
I already tried to:
- change the classloader delegation to parentLast and I got these additional warnings:
[WARNING ] CWNEN0070W: The javax.ws.rs.PathParam annotation class will not be recognized because it was loaded from the file ...
- define a shared library with those jar files,
- or place them under WEB-INF\lib.
In the end, I got the following exception:
java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with javax.xml.parsers.DocumentBuilderFactory
Which libraries should I use to connect to the from WLP to WAS Dmgr with com.ibm.websphere.management.AdminClient?