The artemis-jms-client-all module is really just intended to be used
standalone, and it shades things that artemis-server / commons / etc
do not (the server itself depends on the regular artemis-jms-client
etc). There are various concessions with it, which is why it is the
last thing mentioned in the [current] docs and comes with a warning.
Personally I would always recommend against using it (and have
previously even proposed deleting it).

I would never personally expect them to work together given the above,
and I dont believe there has ever been a single attempt running them
in the same classloader in the codebase, given all the actual tests
use artemis-jms-client and no tests use artemis-jms-client-all.

With your initial comments on the 'inconvenience' of
artemis-jms-client, I take it you are precluding build tooling that
can simply pick up the artemis-jms-client transitive dependencies for
you? The classpath details in the latest docs for the clients
'individual dependencies' is just generated, essentially by listing
the deps coming from having a maven dependency on artemis-jms-client.


Obligatory words of caution even though it seems like you know: 2.28.0
is the current release (with 2.29.0 imminent). There are no more
2.19.x releases coming. There are already 2 newer >8 Java LTS releases
and Java 21 becomes the next in about 4 months.

On Wed, 10 May 2023 at 17:37, PAS Filip <filip....@sodexo.com.invalid> wrote:
>
> Hi Domenico,
>
> Nope both versions are identical.
>
> The broker I connect to remotely is running 2.28 and that connection works.
> All jars and classes of activemq in my project are version 2.19.1.
> It’s only an issue in my test suite when combining the two jars both of the 
> same version.
>
> Regards,
>
> Filip
>
> From: Domenico Francesco Bruscino <bruscin...@gmail.com>
> Sent: Wednesday, May 10, 2023 6:34 PM
> To: users@activemq.apache.org
> Subject: Re: Artemis activemq jms client all incompatible with artemis server
>
> Hi Filip, are you running the ActiveMQ Artemis jms client 2. 19. 1 and the 
> ActiveMQ Artemis server with a version different from 2. 19. 1 in the same 
> JVM? Regards, Domenico On Wed, 10 May 2023 at 18: 20, PAS Filip <Filip. Pas@ 
> sodexo. com. invalid>
> ZjQcmQRYFpfptBannerStart
> This Message Is From an Untrusted Sender
> You have not previously corresponded with this sender.
> ZjQcmQRYFpfptBannerEnd
>
> Hi Filip,
>
>
>
> are you running the ActiveMQ Artemis jms client 2.19.1 and the ActiveMQ
>
> Artemis server with a version different from 2.19.1 in the same JVM?
>
>
>
> Regards,
>
> Domenico
>
>
>
> On Wed, 10 May 2023 at 18:20, PAS Filip 
> <filip....@sodexo.com.invalid<mailto:filip....@sodexo.com.invalid>>
>
> wrote:
>
>
>
> > Just a small follow-up, using artemis-jms-client instead of
>
> > artemis-jms-client-all seems to be working fine
>
> > There is are no duplicate shaded classes this way when combining it with
>
> > artemis-server.
>
> >
>
> > From: PAS Filip 
> > <filip....@sodexo.com.INVALID<mailto:filip....@sodexo.com.INVALID>>
>
> > Sent: Wednesday, May 10, 2023 3:14 PM
>
> > To: users@activemq.apache.org<mailto:users@activemq.apache.org>
>
> > Subject: Artemis activemq jms client all incompatible with artemis server
>
> >
>
> > Hello, I'm working on an application where we are migrating activemq to
>
> > artemis activemq. I'm running into an issue when trying to use the artemis
>
> > server and jms client all together on the same classpath. I'm using version
>
> > 2. 19. 1 of the artemis
>
> > ZjQcmQRYFpfptBannerStart
>
> > External sender
>
> > Check the sender and the content are safe before clicking links or open
>
> > attachments.
>
> > ZjQcmQRYFpfptBannerEnd
>
> >
>
> > Hello,
>
> >
>
> >
>
> >
>
> > I'm working on an application where we are migrating activemq to artemis
>
> > activemq.
>
> >
>
> >
>
> >
>
> > I'm running into an issue when trying to use the artemis server and jms
>
> > client all together on the same classpath.
>
> >
>
> >
>
> >
>
> > I'm using version 2.19.1 of the artemis activemq server since it's the
>
> > last version that's compatible with java 8.
>
> >
>
> > According to the docs I should use this version and it should be able to
>
> > connect fine to a remote activemq broker running java 11.
>
> >
>
> > That seems to work correctly however when running the integration test
>
> > suite I'm replacing the old activemq embedded broker with the one from
>
> > artemis activemq and am running into an issue of incompatibility.
>
> >
>
> >
>
> >
>
> > Our integration test suite uses the embedded broker so the artemis server
>
> > is added to the test classpath.
>
> >
>
> > When running the tests the embedded broker seems to start fine:
>
> >
>
> >
>
> >
>
> > [2023-05-10T14:21:58,942|INFO
>
> > |main|org.apache.activemq.artemis.core.server] AMQ221007: Server is now live
>
> >
>
> > [2023-05-10T14:21:58,943|INFO
>
> > |main|org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ
>
> > Artemis Message Broker version 2.19.1 [localhost,
>
> > nodeID=42455503-ef2d-11ed-8947-00090faa0001]
>
> >
>
> >
>
> >
>
> > However when connecting to it I get an error:
>
> >
>
> >
>
> >
>
> > [2023-05-10T14:22:13,517|WARN |Thread-5
>
> > (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$6@417a98b5<mailto:ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$6@417a98b5>
>
> > )|org.apache.activemq.artemis.core.server<mailto:
>
> > ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl
>
> > $6@417a98b5)|org.apache.activemq.artemis.core.server<mailto<mailto:$6@417a98b5)|org.apache.activemq.artemis.core.server%3cmailto>:
>
> > ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl
>
> > $6@417a98b5
>
> > )|org.apache.activemq.artemis.core.server%3cmailto:ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$6@417a98b5)|org.apache.activemq.artemis.core.server>>]
>
> > AMQ222225: Sending unexpected exception to the client
>
> > java.lang.NoClassDefFoundError: Could not initialize class
>
> > org.apache.activemq.artemis.core.server.cluster.impl.MessageLoadBalancingType
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.postoffice.impl.BindingsImpl.<init>(BindingsImpl.java:68)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.createBindings(PostOfficeImpl.java:1989)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager.addMappingInternal(SimpleAddressManager.java:260)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager.addBinding(SimpleAddressManager.java:99)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.postoffice.impl.WildcardAddressManager.addBinding(WildcardAddressManager.java:95)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl.addBinding(PostOfficeImpl.java:878)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createQueue(ActiveMQServerImpl.java:3833)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createQueue(ActiveMQServerImpl.java:3765)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.createQueue(ServerSessionImpl.java:740)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.slowPacketHandler(ServerSessionPacketHandler.java:377)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler.onMessagePacket(ServerSessionPacketHandler.java:298)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.utils.actors.Actor.doTask(Actor.java:33)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.utils.actors.ProcessorBase.executePendingTasks(ProcessorBase.java:65)
>
> >
>
> >                 at
>
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>
> >
>
> >                 at
>
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>
> >
>
> >                 at
>
> > org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118)
>
> >
>
> >
>
> >
>
> >
>
> >
>
> > There seems to be an incompatibility in the shaded class
>
> > org.apache.activemq.artemis.utils.uri.BeanSupport from commons bean utils.
>
> >
>
> >
>
> >
>
> > I find two classes of org.apache.activemq.artemis.utils.uri.BeanSupport in
>
> > two different jars:
>
> >
>
> >
>
> >
>
> >   *   artemis-commons 2.19.1
>
> >
>
> >   *   artemis-jms-client-all
>
> >
>
> >
>
> >
>
> > In the class Beansupport in the artemis-jms-client-all 2.191 jar I see the
>
> > following import:
>
> >
>
> >
>
> >
>
> > import
>
> > org.apache.activemq.artemis.shaded.org.apache.commons.beanutils.BeanUtilsBean;
>
> >
>
> > import
>
> > org.apache.activemq.artemis.shaded.org.apache.commons.beanutils.Converter;
>
> >
>
> >
>
> >
>
> > In the class Beansupport in the artemis-commons 2.19.1 jar I see the
>
> > following import:
>
> >
>
> >
>
> >
>
> > import org.apache.commons.beanutils.BeanUtilsBean;
>
> >
>
> > import org.apache.commons.beanutils.Converter;
>
> >
>
> >
>
> >
>
> > So what happens when running the tests is that the BeanSupport from jms
>
> > all client is loaded and not from the artemis-server.
>
> >
>
> > This results in the initialization error in the class
>
> > MessageLoadBalancingType.
>
> >
>
> >
>
> >
>
> > I didn't find any mention in the documentation that the activemq jms
>
> > client all is incompatible with the artemis server.
>
> >
>
> > This looks like a bug to me.
>
> >
>
> > For me if the artemis client and server are using a shaded import of
>
> > BeanSupport it would make sense to also use the shaded import for the
>
> > Converter and BeanUtilsBean.
>
> >
>
> >
>
> >
>
> > Can you confirm this? Is there any chance for a bugfix?
>
> >
>
> >
>
> >
>
> > I believe the only option I have to make this work is by not using the jms
>
> > all client jar which is inconvenient to say the least.
>
> >
>
> > There is no BOM (Bill of Materials) and the documentation of the 2.191
>
> > doesn't list the dependencies to import unlike the latest doc which
>
> > mentions all the dependencies to add for the client classpath.
>
> >
>
> >
>
> >
>
> > I'm not sure if this issue exists on the latest version of the artemis
>
> > activemq but it's not an option for me to use that version due to
>
> > incompatibility with java 8.
>
> >
>
> >
>
> >
>
> > Any feedback and or suggestions would be welcome.
>
> >
>
> >
>
> >
>
> > Regards,
>
> >
>
> >
>
> >
>
> > Filip
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >
>
> >

Reply via email to