Commons XmlSchema conflict:
{noformat}
java.lang.NoSuchMethodError: org/apache/ws/commons/schema/XmlSchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchema;
{noformat}That's because the above classes are provided by WebSphere 8.5 (regardless of setting the
_parent-last_ class loader):
* {{WAS_HOME/plugins/org.apache.axis2.jar}}respectively.What has worked for me is this:# console → Environment → Shared Libraries - I've created the shared library called "JAX-RS"
with the JAR:
#* {{M2_REPO}}/org/apache/ws/xmlschema/xmlschema-core/2.0.3/xmlschema-core-2.0.3.jar
# Check the "Use an isolated class loader for this shared library" option
# console → Applications → WebSphere enterprise applications → _your application_ →
Shared library references - I've checked the WAR module, clicked _Reference Shared Libraries_
and added the "JAX-RS" library to the WAR module.
# restart WebSphere (you can't do much in WAS without restarting...)And everything works!我按这步骤搞好了。