1 Reply Latest reply: Apr 19, 2012 5:10 AM by nick pomfret RSS

NegativeArraySizeException

Saurabh Tyagi Newbie

Hello Guys,

 

I am reading message from HornetQ  using

 

message.getBodyBuffer().readString()

 

as i reacive a message i am getting error

 

 

java.lang.NegativeArraySizeException
          at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readSimpleStringInternal(ChannelBufferWrapper.java:83)
          at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readStringInternal(ChannelBufferWrapper.java:112)
          at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readString(ChannelBufferWrapper.java:90)
          at com.hungama.esme.service.StartEsmeService.run(StartEsmeService.java:64)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662


 

 

can any help PLz.

 

Regards

Saurabh

  • 1. Re: NegativeArraySizeException
    nick pomfret Newbie

    I have a similar problem. It seems to be related to large messages in a clustered environemt with compression turned on:

     

    ERROR [giraffe-gallerificationagent-consumer-thread-thread-1] [hornetq.jms.client.HornetQMessageConsumer] Failed to prepare message for delivery

    INFO   | jvm 1    | 2012/04/19 09:05:32 | java.lang.NegativeArraySizeException

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readSimpleStringInternal(ChannelBufferWrapper.java:83)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readNullableSimpleString(ChannelBufferWrapper.java:58)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at org.hornetq.jms.client.HornetQTextMessage.doBeforeReceive(HornetQTextMessage.java:143)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at org.hornetq.jms.client.HornetQMessageConsumer.getMessage(HornetQMessageConsumer.java:236)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at org.hornetq.jms.client.HornetQMessageConsumer.receive(HornetQMessageConsumer.java:133)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at giraffe.messaging.jms.JmsSessionProvider$1.receiveNextMessage(JmsSessionProvider.java:194)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at giraffe.messaging.jms.JmsSessionProvider$1.lookForNextMessage(JmsSessionProvider.java:183)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at giraffe.messaging.jms.JmsSessionProvider$1.feed(JmsSessionProvider.java:209)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at giraffe.messaging.jms.MessagePumperWithTimeLimitQuota.pump(MessagePumperWithTimeLimitQuota.java:33)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at giraffe.messaging.RoundRobinMessagePumper.pump(RoundRobinMessagePumper.java:23)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at giraffe.messaging.SingleThreadedMessagePumpLoop$1.run(SingleThreadedMessagePumpLoop.java:40)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

    INFO   | jvm 1    | 2012/04/19 09:05:32 |      at java.lang.Thread.run(Thread.java:722)