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

ASF GitHub Bot commented on ARTEMIS-1783:
-----------------------------------------

GitHub user michaelandrepearce opened a pull request:

    https://github.com/apache/activemq-artemis/pull/2082

    ARTEMIS-1783 Remove need for guava in client

    Refactor away from Guava memorize based on Guava Supplier to using 
java.util.Supplier and our own memorizer code.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/michaelandrepearce/activemq-artemis 
ARTEMIS-1783

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/2082.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2082
    
----
commit 8bfa6cfada8f35be92774c6ae6e9c39531122448
Author: Michael André Pearce <michael.andre.pearce@...>
Date:   2018-05-11T06:24:35Z

    ARTEMIS-1783 Remove need for guava in client
    
    Refactor away from Guava memorize based on Guava Supplier to using 
java.util.Supplier and our own memorizer code.

----


> Exception in thread "main" java.lang.BootstrapMethodError: 
> java.lang.NoClassDefFoundError: com/google/common/base/Supplier
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-1783
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1783
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.5.0
>            Reporter: Jiri Daněk
>            Assignee: Justin Bertram
>            Priority: Trivial
>
> When using my program cli-artemis-jms at 
> https://github.com/rh-messaging/cli-java, which depends on 
> activemq-artemis-jms-client, I get the following stack trace
> {noformat}
> junit5(?) $ java -jar systemtests/client_executable/cli-artemis-jms.jar 
> receiver --address test --log-msgs json --count 0
> Exception in thread "main" java.lang.BootstrapMethodError: 
> java.lang.NoClassDefFoundError: com/google/common/base/Supplier
>         at 
> org.apache.activemq.artemis.core.message.impl.CoreMessageObjectPools.<init>(CoreMessageObjectPools.java:26)
>         at 
> org.apache.activemq.artemis.core.protocol.ClientPacketDecoder.<init>(ClientPacketDecoder.java:36)
>         at 
> org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.createPacketDecoder(ActiveMQClientProtocolManager.java:520)
>         at 
> org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQClientProtocolManager.connect(ActiveMQClientProtocolManager.java:412)
>         at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1273)
>         at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:891)
>         at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:795)
>         at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:238)
>         at 
> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:784)
>         at 
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:813)
>         at 
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:277)
>         at 
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:272)
>         at 
> com.redhat.mqe.acc.AccConnectionManager.<init>(AccConnectionManager.java:68)
>         at 
> com.redhat.mqe.acc.AccConnectionManagerFactory.make(AccConnectionManagerFactory.java:33)
>         at 
> com.redhat.mqe.acc.AccConnectionManagerFactory.make(AccConnectionManagerFactory.java:27)
>         at com.redhat.mqe.lib.CoreClient.createConnection(CoreClient.java:86)
>         at 
> com.redhat.mqe.lib.ReceiverClient.consumeMessage(ReceiverClient.java:170)
>         at 
> com.redhat.mqe.lib.ReceiverClient.startClient(ReceiverClient.java:147)
>         at com.redhat.mqe.lib.Main.main(Main.java:50)
>         at com.redhat.mqe.acc.Main.main(Main.java:74)
> Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Supplier
>         ... 20 more
> Caused by: java.lang.ClassNotFoundException: com.google.common.base.Supplier
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>         ... 20 more
> {noformat}
> I get this with artemis-jms-client 2.5.0, but not with artemis-jms-client 
> 2.4.0.
> I believe the guilty commit is in ARTEMIS-1586, "794e56da99456e Refactor to 
> make more generic", which introduced usage of Google Guava, without adding it 
> to the package's pom file, causing my maven to miss that transitive 
> dependency when building uberjar.
> The command above runs when triggered from Intellij IDE, where the dependency 
> is on classpath, for some reason.
> Workaround is easy, add Guava to dependencies of your own program which is 
> using the artemis jms library.



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

Reply via email to