4 Replies Latest reply on Jun 11, 2013 5:43 AM by borges

    Getting java.lang.NegativeArraySizeException exception when reading hornetQ message

    Avi Levi Newbie

      trying to use hornetQMessage.getBodyBuffer.readString

      or hornetQMessage.getBodyBuffer.readNullableSimpleString.toString

      getting

      java.lang.NegativeArraySizeException

                at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readSimpleStringInternal(ChannelBufferWrapper.java:83)

                at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readNullableSimpleString(ChannelBufferWrapper.java:58)

                at com.gamescale.messaging.hornetQ.HornetQMessageConverter$.extractGSMessage(HornetQMessageConverter.scala:68)

                at com.gamescale.messaging.hornetQ.MessageBusHornetQClientImpl$$anonfun$1$$anon$2$$anonfun$receive$1.apply(MessageBusHornetQClientImpl.scala:246)

                at com.gamescale.messaging.hornetQ.MessageBusHornetQClientImpl$$anonfun$1$$anon$2$$anonfun$receive$1.apply(MessageBusHornetQClientImpl.scala:243)

                at akka.actor.Actor$class.apply(Actor.scala:563)

                at com.gamescale.messaging.hornetQ.MessageBusHornetQClientImpl$$anonfun$1$$anon$2.apply(MessageBusHornetQClientImpl.scala:242)

                at akka.actor.LocalActorRef.invoke(ActorRef.scala:905)

                at akka.dispatch.MessageInvocation.invoke(MessageHandling.scala:25)

                at akka.dispatch.ExecutableMailbox$class.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:216)

                at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.processMailbox(ExecutorBasedEventDrivenDispatcher.scala:122)

                at akka.dispatch.ExecutableMailbox$class.run(ExecutorBasedEventDrivenDispatcher.scala:188)

                at akka.dispatch.ExecutorBasedEventDrivenDispatcher$$anon$4.run(ExecutorBasedEventDrivenDispatcher.scala:122)

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                at java.lang.Thread.run(Thread.java:722)

                at akka.dispatch.MonitorableThread.run(ThreadPoolBuilder.scala:184)

       

       

      writing messages using  hornetQMessage.getBodyBuffer.writeString

       

      any ideas ?