You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (JIRA)" <ji...@apache.org> on 2018/02/18 00:25:00 UTC

[jira] [Commented] (ARTEMIS-1674) Dependency Conflict : Conflicting classes existing in two libraries

    [ https://issues.apache.org/jira/browse/ARTEMIS-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16368413#comment-16368413 ] 

Justin Bertram commented on ARTEMIS-1674:
-----------------------------------------

I'm not sure this is actually a problem for a couple of reasons:
* Artemis doesn't ship Weld and doesn't have a hard dependency on it.  Weld is an implementation of the CDI specification.  Such an implementation would ostensibly be provided by whatever platform is being used for integration.
* The logging code in Artemis doesn't use any of the classes or methods listed in your comment so regardless of which version is actually loaded first it should work.

> Dependency Conflict : Conflicting classes existing in two libraries
> -------------------------------------------------------------------
>
>                 Key: ARTEMIS-1674
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1674
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>         Environment: [^Conflicting libs.TXT]
>            Reporter: PandaMonkey
>            Priority: Major
>              Labels: features
>             Fix For: 2.5.0
>
>         Attachments: Conflicting libs.TXT
>
>
> Hi, by analyzing artemis-cdi-client:2.5.0-SNAPSHOT "artemis-cdi-client\pom.xml" and its bytecodes, we found libraries "org.jboss.weld.se:weld-se:2.4.0.Final" and "org.jboss.logging:jboss-logging:3.3.1.Final" contains duplicate classes.
>  The following duplicate class pairs having the same names but their internal implementations are different in different JARs:
>  "org.jboss.logging.Log4j2LoggerProvider", 
>  "org.jboss.logging.MDC", 
>  "org.jboss.logging.JBossLogManagerProvider",
>  "org.jboss.logging.Slf4jLoggerProvider", 
>  "org.jboss.logging.Log4j2Logger", 
>  "org.jboss.logging.JBossLogManagerLogger", 
> .........
> Some methods only exist in one class version:
>  org.jboss.logging.Log4j2LoggerProvider: void clearMdc()
>  org.jboss.logging.Log4jLoggerProvider: void clearMdc()
>  org.jboss.logging.MDC: void clear()
>  ......
> Please notice this problem. As the JVM only load the classes present first on the classpath and shadow the other duplicate ones with the same name. So it brings high risks of classpath issues during the truck evolution process, which may throw the *java.lang.NoSuchMethodException* at runtime.
> The conflicting features' details are shown in the attachment. Hope this report can help you, thanks!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)