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(AbstractByteBuf.java:1395)
at
io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.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.ChannelBufferWrapper.readSimpleStringInternal(ChannelBufferWrapper.java:93)
at
org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper.readNullableSimpleString(ChannelBufferWrapper.java:73)
at
org.apache.activemq.artemis.api.core.management.ManagementHelper.getResults(ManagementHelper.java:196)
at
org.apache.activemq.artemis.api.core.management.ManagementHelper.getResult(ManagementHelper.java:224)
at
org.apache.activemq.artemis.api.jms.management.JMSManagementHelper.getResult(JMSManagementHelper.java:149)
at
org.apache.activemq.artemis.api.jms.management.JMSManagementHelper.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.tito...@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(RemotingServiceImpl.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(ByteToMessageDecoder.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(DefaultChannelPipeline.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(NioEventLoop.java:610)
[netty-all-4.1.5.Final.jar:4.1.5.Final]
at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:551)
[netty-all-4.1.5.Final.jar:4.1.5.Final]
at
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.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]