Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
7.2.0.GA
-
None
Description
Calling the following hornetq 2.4 in EAP7.2 to save a byte message to a stream:
ClientMessage messageReceived = null; messageReceived = messageConsumer.receive(); ByteArrayOutputStream bao = new ByteArrayOutputStream(); messageReceived.saveToOutputStream(bao);
causes the following error:
java.lang.IndexOutOfBoundsException: readerIndex(40091) + length(40000) exceeds writerIndex(40091): UnpooledHeapByteBuf(ridx: 40091, widx: 40091, cap: 65536) at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1165) at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:675) at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:683) at io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.java:511) at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readBytes(ChannelBufferWrapper.java:363) at org.hornetq.core.client.impl.ClientMessageImpl.saveToOutputStream(ClientMessageImpl.java:151) at org.jboss.as.quickstarts.jms.HelloWorldCoreConsumer.main(HelloWorldCoreConsumer.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) at java.lang.Thread.run(Thread.java:745)
Attachments
Issue Links
- relates to
-
JBEAP-16698 [GSS](7.2.z) hornetq-core-client with netty in the same classloader cause an java.lang.IndexOutOfBoundsException
- Verified