3 Replies Latest reply on Nov 20, 2001 4:15 AM by Peter Antman

    Destination does not exist while creating it?

    John Baker Newbie

      I get JMS application error in my client when trying to create a queue to receive user messages. The server gives me another. It seems to make no sense to me as obviously the destination doesn't exist as I am trying to create it. Maybe I have missed something obvious.
      Please help me, I am not used to using JBossMQ...

      ----- Server output ----

      [OILServerILService] Client request resulted in a server exception:
      javax.jms.JMSException: This destination does not exist !
      at org.jboss.mq.server.JMSServer.createQueue(JMSServer.java:437)
      at org.jboss.mq.il.oil.OILServerILService.run(OILServerILService.java:238)
      at java.lang.Thread.run(Unknown Source)

      --- client output ----

      org.jboss.mq.SpyJMSException: Cannot get the Queue from the provider
      at org.jboss.mq.SpyConnection.createQueue(SpyConnection.java:179)
      at org.jboss.mq.SpyQueueSession.createQueue(SpyQueueSession.java:82)
      at
      com.katalyzt.toolbox.ext.msg.gui.MessagingAidExtension.initMessaging(Messagi
      ngAidExtension.java:181)
      at
      com.katalyzt.toolbox.ext.msg.gui.MessagingAidExtension.openAid(MessagingAidE
      xtension.java:92)
      at
      com.katalyzt.toolbox.gui.ToolboxSessionPanel.registerAidExtension(ToolboxSes
      sionPanel.java:321)
      at
      com.katalyzt.toolbox.ext.msg.gui.MessagingInitializer.preInitialize(Messagin
      gInitializer.java:26)
      at
      com.katalyzt.toolbox.gui.DefaultExtensionLoader.loadExtensions(DefaultExtens
      ionLoader.java:117)
      at
      com.katalyzt.toolbox.gui.ToolboxSessionPanel$3.run(ToolboxSessionPanel.java:
      105)
      at com.katalyzt.toolbox.task.TaskQueueImpl.runTask(TaskQueueImpl.java:237)
      at com.katalyzt.toolbox.task.TaskQueueImpl.runTask(TaskQueueImpl.java:244)
      at com.katalyzt.toolbox.task.TaskQueueImpl.run(TaskQueueImpl.java:200)
      at java.lang.Thread.run(Thread.java:484)

      linked exception is:

      javax.jms.JMSException: This destination does not exist !

      --- Client code attempting to create a queue with name based on current user id ---

      void initMessaging()
      {
      try
      {
      // Connect to the messaging service
      namingContext = new InitialContext();

      // Setup p2p messaging queue to receive any messages sent to current user
      QueueConnectionFactory factory = (QueueConnectionFactory)namingContext.lookup(QUEUE_CONNECTION_FACTORY);
      QueueConnection connection = factory.createQueueConnection();
      connection.start();
      QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
      session.setMessageListener(this);

      // Create queue to allow other to send me messages
      String userId = TModelSessionProxy.singleton().getUser().getUserName();
      Queue queue = session.createQueue(MESSAGE_P2P_ROOT + userId);
      }
      catch (Exception x)
      {
      getAidExtensionContext().getToolboxSession().getMessageManager().setError(x);
      }
      }