Project

General

Profile

Actions

Task #2838

closed

Conflicting dependencies jaxb-core and istack

Added by Alena Peterová almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Architecture
Target version:
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 #1

Updated by Alena Peterová almost 3 years ago

  • Description updated (diff)
Actions #2

Updated by Tomáš Doischer almost 3 years ago

I've had the same issue with jUnit in extras, the workaround was the same.

Actions #3

Updated by Radek Tomiška almost 3 years ago

  • Category changed from Configuration to Architecture
  • Status changed from New to In Progress
  • Target version set to 11.1.0
Actions #4

Updated by Radek Tomiška almost 3 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 0 to 90

Conflicting Java provided libraries are excluded, commit:
https://github.com/bcvsolutions/CzechIdMng/commit/00b5481808db807ab5fb259156623c3a32d5d99b#diff-6f60b864af2b34f1cc2116e1a359b17c2d55b6b060d7f7898e9bbae91e280735

Both workarounds above are not necessary now.

Could you provide me a feedback, please?

Actions #5

Updated by Vít Švanda almost 3 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 90 to 100

I did review, thanks for that.

Actions #6

Updated by Radek Tomiška almost 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF