Actions
Task #2838
closedConflicting dependencies jaxb-core and istack
Start date:
05/27/2021
Due date:
% Done:
100%
Estimated time:
Owner:
Description
When a module running on Java 11 uses e.g. javax.xml.datatype.DatatypeFactory for SOAP web services, IDE displays following compile error.
"The package javax.xml.datatype is accessible from more than one module: <unnamed>, java.xml"
Also, when deploying the final idm.war and running the web service, we get following exception:
Caused by: java.lang.NoSuchMethodError: 'void com.sun.istack.localization.LocalizableMessageFactory.<init>(java.lang.String, com.sun.istack.localization.LocalizableMessageFactory$ResourceBundleSupplier)' at com.sun.xml.ws.resources.TubelineassemblyMessages.<clinit>(TubelineassemblyMessages.java:28) at com.sun.xml.ws.assembler.MetroConfigLoader.init(MetroConfigLoader.java:114) at com.sun.xml.ws.assembler.MetroConfigLoader.<init>(MetroConfigLoader.java:91) at com.sun.xml.ws.assembler.TubelineAssemblyController.getTubeCreators(TubelineAssemblyController.java:64) at com.sun.xml.ws.assembler.MetroTubelineAssembler.createClient(MetroTubelineAssembler.java:90) at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:313) at com.sun.xml.ws.client.Stub.<init>(Stub.java:280) at com.sun.xml.ws.client.Stub.<init>(Stub.java:213) at com.sun.xml.ws.client.Stub.<init>(Stub.java:228) at com.sun.xml.ws.client.sei.SEIStub.<init>(SEIStub.java:68) at com.sun.xml.ws.client.WSServiceDelegate.getStubHandler(WSServiceDelegate.java:791) at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:780) at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:422)
For the second exception, I found that conflicting libraries are jaxb-core-2.2.11.jar (inherited from camel-mail - camel-core) and istack-commons-runtime-3.0.7.jar (from hibernate-jpamodelgen - jaxb-runtime).
Currently, we must use workarounds:- in Eclipse, set the module BuildPath to OpenJDK 1.8 and compiler compliance version to 1.8
- when building IdM by Tool, remove jaxb-core-2.2.11.jar from the final idm.war
Note: I'm not sure if both conflicts are caused by the same JARs
Actions