[jboss-user] [Messaging, JMS & JBossMQ] - Exception occurs even when connection exists

adoorsarath do-not-reply at jboss.com
Thu Sep 13 02:14:54 EDT 2007


  I have a JMS application running in Tomcat.

  I have timer task which will retrieve messages from JBossMQ Queue

  When I stop the JBoss,the JMS application throws the Exception in the 

  following code snippet
     message = (TextMessage)messenger.receiveNoWait( destination );

  Cannot subscribe to this Destination: Client is not connected; - nested throwabl
e: (java.io.IOException: Client is not connected)
org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: Client is no
t connected; - nested throwable: (java.io.IOException: Client is not connected)
        at org.jboss.mq.Connection.addConsumer(Connection.java:1094)
        at org.jboss.mq.SpySession.addConsumer(SpySession.java:753)
        at org.jboss.mq.SpyQueueSession.createReceiver(SpyQueueSession.java:105)

        at org.apache.commons.messenger.MessengerSupport.createMessageConsumer(M
        at org.apache.commons.messenger.MessengerSupport.getMessageConsumer(Mess
        at org.apache.commons.messenger.MessengerSupport.receiveNoWait(Messenger
        at org.amma.atech.hmos.sms.JMSResponseHandler.run(JMSResponseHandler.jav
        at java.util.TimerThread.mainLoop(Timer.java:432)
        at java.util.TimerThread.run(Timer.java:382)
Caused by: java.io.IOException: Client is not connected
        at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.
        at org.jboss.mq.il.uil2.SocketManager.sendMessage(SocketManager.java:189
        at org.jboss.mq.il.uil2.UILServerIL.subscribe(UILServerIL.java:463)
        at org.jboss.mq.Connection.addConsumer(Connection.java:1082)
        ... 8 more

   I have caught the Exception and written code to reconnect to the    
   Application Server.

   But Still it is throwing the Same Exception .But it doesn't throw any 
   exception while connecting to the server and looking up the destination.

   If any body Knows the Solution,please help me..

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083776#4083776

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083776

More information about the jboss-user mailing list