javaee / metro

Metro has been contributed to Eclipse Foundation. Please use the link below to find the latest project
https://github.com/eclipse-ee4j/metro-jax-ws
Other
10 stars 1 forks source link

Class conflicts #50

Open AFulgens opened 5 years ago

AFulgens commented 5 years ago

Using webservices-rt:2.4.3, I noticed a class conflict issue, when using together with e.g., xmlsec:2.0.6.

For example the package org.apache.xml.security.utils.resolver is 1-to-1 copied into webservices-rt, but with another version for many classes. This means that I can compile the project, but if I try to access a class at an incompatible point at runtime and the class from webservices-rt has been loaded instead that of xmlsec, I will get a runtime exception (e.g., NoSuchMethodError).

Note: the same package is included in java.xml.crypto (JDK 11), but it is shaded under com.sun, thus there is no conflict.

If I understand correctly, this is a general issue, which encapsulates #43.

Example exception:

java.lang.NoSuchMethodError: org.apache.xml.security.utils.resolver.ResourceResolverException.<init>(Ljava/lang/Exception;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V