3 Replies Latest reply on Mar 28, 2012 2:39 AM by Saurabh Tyagi

    HornetQException[errorCode=104 message=Could not find reference on consumerID=0

    Saurabh Tyagi Newbie

      Hello Friends,

       

      Sorry that i am reposting this. Please help..!!

       

      I am using Jboss EE version 5.1.2 which is using HornetQ Version 2.2.8.GA.

       

      Manually i am pushing data to JMS using Jmeter (for Testing) and on the other end I am reading data From JMS using Stand Alone System.

      I am able to Read some data (approx 200 Records ) but after some time i Start Getting Error on JBoss Console. Logs are as follows

       

      13:15:57,474 INFO  [ServerImpl] JBoss (Microcontainer) [5.1.2 (build: SVNTag=JBPAPP_5_1_2 date=201111102209)] Started in 29s:887ms

      13:19:27,330 ERROR [ServerSessionPacketHandler] Caught exception

      HornetQException[errorCode=104 message=Could not find reference on consumerID=0, messageId = 6456273674 queue = messages.ConnectionFactory]

                at org.hornetq.core.server.impl.ServerConsumerImpl.acknowledge(ServerConsumerImpl.java:627)

                at org.hornetq.core.server.impl.ServerSessionImpl.acknowledge(ServerSessionImpl.java:595)

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

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

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

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

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

                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:362)

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

                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:362)

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

                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.IoWorkerRunnable.run(IoWorkerRunnable.java:46)

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

                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)

      13:19:27,331 ERROR [ServerSessionPacketHandler] Caught exception

      HornetQException[errorCode=104 message=Could not find reference on consumerID=0, messageId = 6456273658 queue = messages.ConnectionFactory]

                at org.hornetq.core.server.impl.ServerConsumerImpl.acknowledge(ServerConsumerImpl.java:627)

                at org.hornetq.core.server.impl.ServerSessionImpl.acknowledge(ServerSessionImpl.java:595)

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

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

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

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

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

                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:362)

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

                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:362)

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

                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.IoWorkerRunnable.run(IoWorkerRunnable.java:46)

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

                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)

        • 1. Re: HornetQException[errorCode=104 message=Could not find reference on consumerID=0
          Andy Taylor Master

          its hard to say without some more information, such as your client code and an explanation of what you are doing.

          • 2. Re: HornetQException[errorCode=104 message=Could not find reference on consumerID=0
            Saurabh Tyagi Newbie

            Hello Andy,

            Thanks a lot for answer.

            What am i doing is simple operation.

             

            I am pulshind data in the queue using JMeter and pulling the same data from Jms using below code.

             

            The client code that i am using is as follows

             

            *************************************************

             

            public static TopicSubscriber consumeFromJms(SystemProperties systemProperties) throws JMSException

                      {

                                TextMessage message;

                                TopicConnection topicConn = null;

                                TopicSubscriber topicSubscriber = null;

                                // get the initial context

                                try {

                                          // get the initial context

                                          if(jndiContextMT==null)

                                          {

                                                    jndiContextMT = getInitialContexForMT(systemProperties.getMOTopicIP(), systemProperties.getMOTopicPort());

                                          }

             

             

                                          System.out.println(Thread.currentThread().getName());

             

             

                                          // lookup the topic object

                                          Topic topic = (Topic)jndiContextMT.lookup(systemProperties.getMTTopicName());

             

             

                                          // lookup the topic connection factory

                                          TopicConnectionFactory connectionFactory = (TopicConnectionFactory)jndiContextMT.lookup(systemProperties.getMTConnectionFactoryName());

                                          // create a topic connection

                                          topicConn = connectionFactory.createTopicConnection();

                                          topicConn.setClientID( systemProperties.getMTClientId());

             

             

                                          // create a topic session

                                          TopicSession topicSession = topicConn.createTopicSession(false,

                                                              Session.AUTO_ACKNOWLEDGE);

             

             

                                          // create a topic subscriber

             

             

                                          topicSubscriber = topicSession.createDurableSubscriber(topic, systemProperties.getMTConnectionFactoryName());

             

             

                                          // start the connection

                                          topicConn.start();

             

             

                                          // receive the message

                                          //                              message = (TextMessage)topicSubscriber.receive();

                                          //                              System.out.println("message :::: "+message.getText());

             

             

             

             

             

             

                                          // close the topic connection

                                } catch (NamingException e) {

                                          e.printStackTrace();

                                } catch (JMSException e) {

                                          e.printStackTrace();

                                }

             

             

                                return topicSubscriber;

                      }

             

            *********************************************************8

            • 3. Re: HornetQException[errorCode=104 message=Could not find reference on consumerID=0
              Saurabh Tyagi Newbie

              I guess this issue was due to poor coding i did.

              I changed my code and it got resolved.

               

              Thanks guys