3 Replies Latest reply on Mar 6, 2013 6:00 PM by Kat Bradley

    Mysterious IllegalStateException - cannot find ref to ack

    Kat Bradley Newbie

      I am using hornetq version 2.2.14 embedded in our application using only the core API.   I have a single consumer on a single queue, receiving messages from a producer on the same machine in another application.

       

      Occasionally (seemingly at random) I am receiving this exception at the console.  I am also seeing some issues where messages appear to not be delivered to my consumer, and due to the timing of this exception, I suspect the two may be related.

       

      Any hints on what the issue might be or where to start debugging it? 

       

      ERRORCaught unexpected exception

      -- Exception : java.lang.IllegalStateException

      Cannot find ref to ack 4294968035



      at org.hornetq.core.server.impl.ServerConsumerImpl.individualAcknowledge(ServerConsumerImpl.java:687)


      at org.hornetq.core.server.impl.ServerSessionImpl.individualAcknowledge(ServerSessionImpl.java:607)


      at org.hornetq.core.protocol.core.ServerSessionPacketHandler.handlePacket(ServerSessionPacketHandler.java:416)


      at org.hornetq.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:508)


      at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:556)


      at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:517)


      at org.hornetq.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:533)


      at org.hornetq.core.remoting.impl.netty.HornetQChannelHandler.messageReceived(HornetQChannelHandler.java:73)


      at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:100)


      at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372)


      at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:534)


      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:287)


      at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.decode(HornetQFrameDecoder2.java:169)


      at org.hornetq.core.remoting.impl.netty.HornetQFrameDecoder2.messageReceived(HornetQFrameDecoder2.java:134)


      at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)


      at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:372)


      at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:367)


      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)


      at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)


      at org.jboss.netty.channel.socket.oio.OioWorker.run(OioWorker.java:90)


      at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)


      at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)


      at org.jboss.netty.util.VirtualExecutorService$ChildExecutorRunnable.run(VirtualExecutorService.java:181)


      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)