2 Replies Latest reply on Sep 26, 2012 1:47 PM by Eric Robinson

    Removing consumer which did not handle a message: java.lang.IndexOutOfBoundsException

    Eric Robinson Newbie

      I am getting the following exception which ends up messing up my jms topic.

      The error occurs in JBoss 7.1 and 7.1.1 running with a single standalone instance.

       

      I have 3 java clients subscribing to a topic and everything seems to be working fine, but once I connect a client using stomp things start to go wrong.

      If the stomp client would crash or not close its connection correctly I can get the exception. Once I get the exception one of my java clients might stop getting its messages.

      My message producer is sending a message every 5 seconds.

       

       

       

      WARN [org.hornetq.core.server.impl.QueueImpl] (Old I/O server worker (parentId: 975093000, [id: 0x3a1ebd08, /0.0.0.0:5445])) removing consumer which did not handle a message, consumer=or

      1. g.hornetq.core.server.impl.ServerConsumerImpl@2e49b863, message=Reference[149]:RELIABLE:ServerMessage[messageID=149,priority=4,expiration=0, durable=true, address=jms.topic.Status,properties=TypedProp

      erties[{JMSXDeliveryCount=1, systemID=Test, sender=JMSStatusClient, clientID=Test}]]: java.lang.IndexOutOfBoundsException

      at org.jboss.netty.buffer.AbstractChannelBuffer.setIndex(AbstractChannelBuffer.java:67) [netty-3.2.3.Final.jar:]

      at org.hornetq.core.buffers.impl.ChannelBufferWrapper.setIndex(ChannelBufferWrapper.java:497) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.message.impl.MessageImpl.forceCopy(MessageImpl.java:954) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.message.impl.MessageImpl.encodeToBuffer(MessageImpl.java:885) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.message.impl.MessageImpl.getEncodedBuffer(MessageImpl.java:478) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.protocol.core.impl.wireformat.SessionReceiveMessage.encode(SessionReceiveMessage.java:73) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.protocol.core.impl.ChannelImpl.send(ChannelImpl.java:163) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBatched(ChannelImpl.java:147) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.protocol.core.impl.CoreSessionCallback.sendMessage(CoreSessionCallback.java:76) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:704) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.server.impl.ServerConsumerImpl.handle(ServerConsumerImpl.java:291) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.server.impl.QueueImpl.handle(QueueImpl.java:2017) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.server.impl.QueueImpl.deliverDirect(QueueImpl.java:1962) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.server.impl.QueueImpl.addTail(QueueImpl.java:392) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.postoffice.impl.PostOfficeImpl.addReferences(PostOfficeImpl.java:1140) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.postoffice.impl.PostOfficeImpl.access$200(PostOfficeImpl.java:77) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.postoffice.impl.PostOfficeImpl$1.done(PostOfficeImpl.java:990) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.persistence.impl.nullpm.NullStorageManager.afterCompleteOperations(NullStorageManager.java:385) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.postoffice.impl.PostOfficeImpl.processRoute(PostOfficeImpl.java:979) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:634) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.postoffice.impl.PostOfficeImpl.route(PostOfficeImpl.java:561) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.server.impl.ServerSessionImpl.doSend(ServerSessionImpl.java:1365) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.server.impl.ServerSessionImpl.send(ServerSessionImpl.java:1107) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.protocol.core.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:440) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:474) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:496) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:457) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:458) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73) [hornetq-core-2.2.7.Final.jar:]

      at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:514) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:287) [netty-3.2.3.Final.jar:]

      at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169) [hornetq-core-2.2.7.Final.jar:]

      at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134) [hornetq-core-2.2.7.Final.jar:]

      at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:357) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261) [netty-3.2.3.Final.jar:]

             at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:90) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.util.internal.IoWorkerRunnable.run(IoWorkerRunnable.java:46) [netty-3.2.3.Final.jar:]

      at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181) [netty-3.2.3.Final.jar:]

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.7.0_03]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.7.0_03]

      at java.lang.Thread.run(Thread.java:722) [:1.7.0_03]

        • 1. Re: Removing consumer which did not handle a message: java.lang.IndexOutOfBoundsException
          Dmitriy Avseitsev Newbie

          Hello, Eric.

           

          Have you solved your problem? I have it too.

           

          I am using JBoss AS 7.1.1. And I have configured stomp acceptor:

          <acceptors>

                <netty-acceptor name="netty-stomp" socket-binding="messaging-stomp">

                    <param key="protocol" value="stomp"/>

                </netty-acceptor>

          .....

          </acceptors>

           

          I have 2 Java clients that connecting to JMS and works fine.

          And I have 3 C++ STOMP clients implemented on ActiveMQ-CPP. Its work fine too.

          But when a try to connect 1 or more Java clients and 1 or more STOMP clients together, than things start to go wrong.

          I take next exeptions:

           

          09:41:18,877 WARN  [org.hornetq.core.server.impl.QueueImpl] (Thread-18 (HornetQ-server-HornetQServerImpl::serverUUID=7a78dd26-bba3-11e1-b361-8c89a587412a-411989110))

          removing consumer which did not handle a message, consumer=org.hornetq.core.server.impl.ServerConsumerImpl@1b63ef8a, message=Reference[37770275294]:RELIABLE:ServerMessage[messageID=37770275294,priority=4, bodySize=1500,expiration=0, durable=true, address=jms.topic.requests,properties=TypedProperties[{recipient=all, sender=[192.168.1.75 ], request_timeout=0, request_time=1348641678875, request_id=qa}]]@1082053577: java.lang.IndexOutOfBoundsException

                    at org.jboss.netty.buffer.AbstractChannelBuffer.setIndex(AbstractChannelBuffer.java:67) [netty-3.2.6.Final.jar:]

                    at org.hornetq.core.buffers.impl.ChannelBufferWrapper.setIndex(ChannelBufferWrapper.java:497) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.message.impl.MessageImpl.forceCopy(MessageImpl.java:960) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.message.impl.MessageImpl.encodeToBuffer(MessageImpl.java:891) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.message.impl.MessageImpl.getEncodedBuffer(MessageImpl.java:486) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.protocol.core.impl.wireformat.SessionReceiveMessage.encode(SessionReceiveMessage.java:73) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.protocol.core.impl.ChannelImpl.send(ChannelImpl.java:183) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBatched(ChannelImpl.java:162) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.protocol.core.impl.CoreSessionCallback.sendMessage(CoreSessionCallback.java:76) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:798) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.ServerConsumerImpl.handle(ServerConsumerImpl.java:313) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl.handle(QueueImpl.java:2195) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1746) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl.doPoll(QueueImpl.java:1625) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl.access$1300(QueueImpl.java:77) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl$ConcurrentPoller.run(QueueImpl.java:2482) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [hornetq-core-2.2.13.Final.jar:]

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]

                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]

           

          09:41:18,885 ERROR [org.hornetq.utils.OrderedExecutorFactory] (Thread-18 (HornetQ-server-HornetQServerImpl::serverUUID=7a78dd26-bba3-11e1-b361-8c89a587412a-411989110)) Caught unexpected Throwable: java.util.NoSuchElementException

                    at org.hornetq.utils.PriorityLinkedListImpl$PriorityLinkedListIterator.repeat(PriorityLinkedListImpl.java:189) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1763) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl.doPoll(QueueImpl.java:1625) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl.access$1300(QueueImpl.java:77) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl$ConcurrentPoller.run(QueueImpl.java:2482) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [hornetq-core-2.2.13.Final.jar:]

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]

                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]

           

           

          And when I try to stop Jboss sometimes I see this exeptions

           

          10:25:39,685 ERROR [org.hornetq.core.server.impl.QueueImpl] Failed to deliver: java.util.NoSuchElementException

                    at org.hornetq.utils.PriorityLinkedListImpl$PriorityLinkedListIterator.repeat(PriorityLinkedListImpl.java:189) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1763) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl.access$1100(QueueImpl.java:77) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.core.server.impl.QueueImpl$DeliverRunner.run(QueueImpl.java:2454) [hornetq-core-2.2.13.Final.jar:]

                    at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [hornetq-core-2.2.13.Final.jar:]

                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]

                    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]