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

[jira] [Created] (ARTEMIS-1682) duplicate classes in Artemis jars

Jeff Mesnil created ARTEMIS-1682:
------------------------------------

             Summary: duplicate classes in Artemis jars
                 Key: ARTEMIS-1682
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1682
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: Broker
            Reporter: Jeff Mesnil


This is a recent change in Artemis master branch.

The org.apache.activemq.artemis.utils package whose source files are in artemis-commons are also present in the artemis-server jar.

 
{code:java}
$ find . -name ExecutorFactory.java
./artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ExecutorFactory.java
$ jar tvf artemis-commons/target/artemis-commons-2.5.0-SNAPSHOT.jar | grep ExecutorFactory
2335 Wed Feb 14 09:30:54 CET 2018 org/apache/activemq/artemis/utils/actors/OrderedExecutorFactory.class
230 Wed Feb 14 09:30:54 CET 2018 org/apache/activemq/artemis/utils/ExecutorFactory.class
$ jar tvf artemis-server/target/artemis-server-2.5.0-SNAPSHOT.jar | grep ExecutorFactory
230 Wed Feb 14 09:30:54 CET 2018 org/apache/activemq/artemis/utils/ExecutorFactory.class
{code}
 
This causes issue when we integrate Artemis on our application server that is using a modular class loader as there are 2 definitions of the ExecutorFactory class and we end up with weird errors such as:

{code}
12:02:16,754 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 68) MSC000001: Failed to start service jboss.messaging-activemq.default.jms.manager: org.jboss.msc.service.StartException in service jboss.messaging-activemq.default.jms.manager: java.lang.IncompatibleClassChangeError: Class org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory does not implement the requested interface org.apache.activemq.artemis.utils.ExecutorFactory
        at org.wildfly.extension.messaging.activemq.jms.JMSService.doStart(JMSService.java:209)
        at org.wildfly.extension.messaging.activemq.jms.JMSService.access$000(JMSService.java:64)
        at org.wildfly.extension.messaging.activemq.jms.JMSService$1.run(JMSService.java:99)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1979)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1481)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
        at java.lang.Thread.run(Thread.java:745)
        at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.IncompatibleClassChangeError: Class org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory does not implement the requested interface org.apache.activemq.artemis.utils.ExecutorFactory
        at org.apache.activemq.artemis.core.persistence.impl.journal.AbstractJournalStorageManager.<init>(AbstractJournalStorageManager.java:222)
        at org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager.<init>(JournalStorageManager.java:106)
        at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createStorageManager(ActiveMQServerImpl.java:2151)
        at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart1(ActiveMQServerImpl.java:2287)
        at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:63)
        at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:522)
        at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:461)
        at org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:392)
        at org.wildfly.extension.messaging.activemq.jms.JMSService.doStart(JMSService.java:205)
        ... 9 more
{code}

This happens because the ActiveMQServerImpl is referencing the ExecutorFactory class from artemis-server jar while the OrderedExecutorFactory class is referencing the ExecutorFactory class from artemis-commons.





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