activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martyn Taylor <mtay...@redhat.com>
Subject Re: Artemis 2.0 : Client with v2.0.x jars in the classpath to a v1.5.x server. is it supported?
Date Tue, 28 Mar 2017 09:23:15 GMT
Ah I see you are using the JMSManagement API.  This goes beyond plain JMS
and unfortunately is not supported in 2.0.0.  It was one of the main
reasons we needed to do a major release as the architecture change required
removal of server side JMS components.

You can do all the same stuff using the
org.apache.activemq.artemis.api.core.management.ManagementHelper (which
uses the Artemis CORE API).  The addressing model has changed slightly in
Artemis, in that you will need to create addresses and queues vs JMS topics
queues.  See the chapter on the latest address model for more information:
https://activemq.apache.org/artemis/docs/2.0.0/address-model.html

Thanks

On Mon, Mar 27, 2017 at 10:38 PM, titou10 <titou10.titou10@gmail.com> wrote:

> It does not to work the other way either:
>
> Java client with the Artemis v1.5.3 client jar on the classpath trying to
> talk to a v2.0.0 server
> It fails with an exception on the client side:
> java.lang.IndexOutOfBoundsException: readerIndex(22) + length(276)
> exceeds writerIndex(294): UnpooledDuplicatedByteBuf(ridx: 22, widx: 294,
> cap: 629, unwrapped: UnpooledUnsafeHeapByteBuf(ridx: 617, widx: 629, cap:
> 629))
>
> As the exception seems to be in netty, I tested it with
> netty-all-4.1.5.Final.jar (from Artemis v1.5.3) and
> netty-all-4.1.6.Final.jar (from v2.0.0)
>
> Should I open a JIRA or is there something wrong with my code / config ?
>
> Thanks
>
> Denis (Author of JMSToolBox on sourceforge)
> ===================
> The code:
>    Session sessionJMS = ...
>    Queue  managementQueue = ActiveMQJMSClient.createQueue(
> "activemq.management");
>    QueueRequestor requestorJMS = new QueueRequestor((QueueSession)
> sessionJMS, managementQueue);
>    Message m = sessionJMS.createMessage();
>    JMSManagementHelper.putAttribute(m, "broker", "queueNames");
>    Message r = requestorJMS.request(m); --> fails here
>
> The client side exception :
> java.lang.IndexOutOfBoundsException: readerIndex(22) + length(276)
> exceeds writerIndex(294): UnpooledDuplicatedByteBuf(ridx: 22, widx: 294,
> cap: 629, unwrapped: UnpooledUnsafeHeapByteBuf(ridx: 617, widx: 629, cap:
> 629))
>         at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(Abstract
> ByteBuf.java:1395)
>         at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractB
> yteBuf.java:1389)
>         at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.
> java:850)
>         at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.
> java:858)
>         at io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.
> java:649)
>         at org.apache.activemq.artemis.core.buffers.impl.ChannelBufferW
> rapper.readSimpleStringInternal(ChannelBufferWrapper.java:93)
>         at org.apache.activemq.artemis.core.buffers.impl.ChannelBufferW
> rapper.readNullableSimpleString(ChannelBufferWrapper.java:73)
>         at org.apache.activemq.artemis.api.core.management.ManagementHe
> lper.getResults(ManagementHelper.java:196)
>         at org.apache.activemq.artemis.api.core.management.ManagementHe
> lper.getResult(ManagementHelper.java:224)
>         at org.apache.activemq.artemis.api.jms.management.JMSManagement
> Helper.getResult(JMSManagementHelper.java:149)
>         at org.apache.activemq.artemis.api.jms.management.JMSManagement
> Helper.getResult(JMSManagementHelper.java:139)
>         at org.titou10.jtb.qm.activemq.ActiveMQArtemisQManager.connect(
> ActiveMQArtemisQManager.java:148)
>
>
> Le 24/03/2017 à 09:33, Martyn Taylor a écrit :
>
>> We only support old clients against a new broker.  We don't support new
>> clients against old broker.
>>
>> On Fri, Mar 24, 2017 at 1:11 PM, titou10 <titou10.titou10@gmail.com>
>> wrote:
>>
>> Hi,
>>>
>>> I have a java client with the Artemis v2.0.0 client jar on the classpath
>>> trying to talk to a v1.5.2 server
>>>
>>> It fails with exception "AMQ214013: Failed to decode packet:
>>> java.lang.IllegalArgumentException: AMQ119032: Invalid type: -12"
>>>
>>> Is this supported, ie v2.0.x jars talking to a v1.5.x server? If so
>>> should
>>> I open a JIRA?
>>>
>>> Thanks
>>>
>>> Denis (Author of JMSToolBox on sourceforge)
>>> ===================
>>> The code:
>>>     Session sessionJMS = ...
>>>     Queue  managementQueue = ActiveMQJMSClient.createQueue(
>>> "activemq.management");
>>>     QueueRequestor requestorJMS = new QueueRequestor((QueueSession)
>>> sessionJMS, managementQueue); //->fails here
>>>
>>> The client side exception :
>>> 08:58:25,727 ERROR [org.apache.activemq.artemis.core.client] AMQ214013:
>>> Failed to decode packet: java.lang.IllegalArgumentException: AMQ119032:
>>> Invalid type: -12
>>>      at org.apache.activemq.artemis.core.protocol.core.impl.PacketDe
>>> coder.decode(PacketDecoder.java:424) [artemis-core-client-1.5.2.jar
>>> :1.5.2]
>>>      at org.apache.activemq.artemis.core.protocol.ClientPacketDecode
>>> r.decode(ClientPacketDecoder.java:60) [artemis-core-client-1.5.2.jar
>>> :1.5.2]
>>>      at org.apache.activemq.artemis.core.protocol.ServerPacketDecode
>>> r.decode(ServerPacketDecoder.java:202) [artemis-server-1.5.2.jar:1.5.2]
>>>      at org.apache.activemq.artemis.core.protocol.core.impl.Remoting
>>> ConnectionImpl.bufferReceived(RemotingConnectionImpl.java:349)
>>> [artemis-core-client-1.5.2.jar:1.5.2]
>>>      at org.apache.activemq.artemis.core.remoting.server.impl.Remoti
>>> ngServiceImpl$DelegatingBufferHandler.bufferReceived(Remotin
>>> gServiceImpl.java:621)
>>> [artemis-server-1.5.2.jar:1.5.2]
>>>      at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveM
>>> QChannelHandler.channelRead(ActiveMQChannelHandler.java:68)
>>> [artemis-core-client-1.5.2.jar:1.5.2]
>>>      at io.netty.channel.AbstractChannelHandlerContext.invokeChannel
>>> Read(AbstractChannelHandlerContext.java:372)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.AbstractChannelHandlerContext.invokeChannel
>>> Read(AbstractChannelHandlerContext.java:358)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRe
>>> ad(AbstractChannelHandlerContext.java:350)
>>> [netty-all-4.1.5.Final.jar:4.1
>>> .5.Final]
>>>      at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(
>>> ByteToMessageDecoder.java:293)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.handler.codec.ByteToMessageDecoder.channelRead(Byte
>>> ToMessageDecoder.java:267)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.AbstractChannelHandlerContext.invokeChannel
>>> Read(AbstractChannelHandlerContext.java:372)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.AbstractChannelHandlerContext.invokeChannel
>>> Read(AbstractChannelHandlerContext.java:358)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.AbstractChannelHandlerContext.fireChannelRe
>>> ad(AbstractChannelHandlerContext.java:350)
>>> [netty-all-4.1.5.Final.jar:4.1
>>> .5.Final]
>>>      at io.netty.channel.DefaultChannelPipeline$HeadContext.
>>> channelRead(DefaultChannelPipeline.java:1334)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.AbstractChannelHandlerContext.invokeChannel
>>> Read(AbstractChannelHandlerContext.java:372)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.AbstractChannelHandlerContext.invokeChannel
>>> Read(AbstractChannelHandlerContext.java:358)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.DefaultChannelPipeline.fireChannelRead(Defa
>>> ultChannelPipeline.java:926)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.
>>> read(AbstractNioByteChannel.java:129) [netty-all-4.1.5.Final.jar:4.1
>>> .5.Final]
>>>      at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEven
>>> tLoop.java:610)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimiz
>>> ed(NioEventLoop.java:551)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEve
>>> ntLoop.java:465)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:437)
>>> [netty-all-4.1.5.Final.jar:4.1.5.Final]
>>>      at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(
>>> SingleThreadEventExecutor.java:873) [netty-all-4.1.5.Final.jar:4.1
>>> .5.Final]
>>>      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
>>>
>>>
>>>
>>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message