While running from java class everything is working fine, but same implementation from UDJC throwing error.
How the jar orders are getting changed ?

In init using below code :


URLClassLoader loader = (URLClassLoader)ClassLoader.getSystemClassLoader();
CClassLoader classLoader = new CClassLoader (loader.getURLs());
File libFolder = new File("/usr/local/abc/home/jars/myjars");
String[] jars = libFolder.list();
for(int i=0; i<jars.length;i++){
classLoader.addURL(new File("/usr/local/abc/home/jars/myjars"+"/"+jars[i]).toURI().toURL());
}




Class clazz = Class.forName("com.server.service.Initializer",true,cerpClassLoader);

Method method = clazz.getMethod("getData", null);

Error :

ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub cannot be cast to org.apache.cxf.frontend.ClientProxy
at org.apache.cxf.frontend.ClientProxy.getClient(ClientProxy.java:93)