You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org.springframework.jms.MessageEOFException: Cannot read all of non-RMQ Message body.; nested exception is javax.jms.MessageEOFException: Cannot read all of non-RMQ Message body.
at org.springframework.jms.support.JmsUtils.convertJmsAccessException(JmsUtils.java:294)
at org.springframework.jms.support.JmsAccessor.convertJmsAccessException(JmsAccessor.java:169)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:487)
at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.send(JmsConfiguration.java:484)
at org.apache.camel.component.jms.JmsProducer.doSend(JmsProducer.java:440)
at org.apache.camel.component.jms.JmsProducer.processInOnly(JmsProducer.java:394)
at org.apache.camel.component.jms.JmsProducer.process(JmsProducer.java:157)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:145)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:541)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:198)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:198)
at org.apache.camel.component.netty4.handlers.ServerChannelHandler.processAsynchronously(ServerChannelHandler.java:138)
at org.apache.camel.component.netty4.handlers.ServerChannelHandler.channelRead0(ServerChannelHandler.java:109)
at org.apache.camel.component.netty4.http.handlers.HttpServerChannelHandler.channelRead0(HttpServerChannelHandler.java:213)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at org.apache.camel.component.netty4.http.handlers.HttpServerMultiplexChannelHandler.channelRead0(HttpServerMultiplexChannelHandler.java:113)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:38)
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:353)
at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:66)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.jms.MessageEOFException: Cannot read all of non-RMQ Message body.
at com.rabbitmq.jms.client.message.RMQBytesMessage.recreate(RMQBytesMessage.java:561)
at com.rabbitmq.jms.client.RMQMessage.normalise(RMQMessage.java:1356)
at com.rabbitmq.jms.client.RMQMessageProducer.internalSend(RMQMessageProducer.java:234)
at com.rabbitmq.jms.client.RMQMessageProducer.send(RMQMessageProducer.java:189)
at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:626)
at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSend(JmsConfiguration.java:592)
at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.doSendToDestination(JmsConfiguration.java:531)
at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate.access$100(JmsConfiguration.java:473)
at org.apache.camel.component.jms.JmsConfiguration$CamelJmsTemplate$1.doInJms(JmsConfiguration.java:487)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:484)
... 23 more
It seems that the problem is in RMQBytesMessage#recreate(BytesMessage), line if (bodySize != msg.readBytes(byteArray, bodySize)). If the stream is empty, readBytes returns -1, which corresponds to bodySize being 0. However with the current straightforward comparison -1 and 0 are not equal.
The text was updated successfully, but these errors were encountered:
Sending an empty message results in this error:
It seems that the problem is in
RMQBytesMessage#recreate(BytesMessage)
, lineif (bodySize != msg.readBytes(byteArray, bodySize))
. If the stream is empty, readBytes returns-1
, which corresponds to bodySize being0
. However with the current straightforward comparison-1
and0
are not equal.The text was updated successfully, but these errors were encountered: