Description
EAP7.2 ships with:
- hornetq-core-client, version 2.4.7.Final-redhat-1
- netty-all 4.1.25.Final-redhat-00003
When invoking hornetq core API, with netty in the classpath, the following error can happen:
ava.lang.IndexOutOfBoundsException: readerIndex(40091) + length(40000) exceeds writerIndex(40448): UnpooledUnsafeHeapByteBuf(ridx: 40091, widx: 40448, cap: 65536)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1178)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1172)
at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:693)
at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:701)
at io.netty.buffer.WrappedByteBuf.readBytes(WrappedByteBuf.java:518)
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.HelloWorldCoreClient.main(HelloWorldCoreClient.java:88)
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)
In the reproducer, changing the dependency on netty to an earlier version (such as 4.0.18.Final-redhat-1) resolves the issue, so it looks more as a netty bug. However, for apps deployed in EAP, with dependencies on both jars, the problem is unavoidable
Attachments
Issue Links
- is related to
-
JBEAP-16627 java.lang.IndexOutOfBoundsException when calling ClientMessage.saveToOutputStream()
- Closed