1 Reply Latest reply on Jan 26, 2006 1:16 PM by jozeph78

    Cannot context.lookup(myQueue)

    jozeph78

      Hello. I am performing a migration from 4.0 to 4.3SP1and I'm having a hard time running my simple JMSVerify Test class that sends an object to and from the queue. Our Jboss configuration is as vanilla as it can get using default configuration. All I did was replace the deploy/jms/jbossmq-destinations.xml with the one containing our queues. This file worked fine in 4.0 for us but doesn't want to cooperate with 4.3.

      I seem to be getting the initial context alright but I get the following exception when trying to lookup my queue:

      javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]



      There aren't any other issues when JBoss starts up even with log4j set to debug. The only exceptions thrown is SQL exceptions for trying to recreate the JMS tables. When Jboss starts up I do get this message indicating that it is getting bound to JNDI:

      15:13:59,720 INFO [MC-QUEUE] Bound to JNDI name: queue/MC-QUEUE


      Yet when I run this code it pukes right at the ctx.loopup() call :

      String ipAddress = "192.168.0.75";
      
       System.out.println("Connecting to messaging server ("+ipAddress+") ...");
      
       Properties properties = new Properties();
       properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
       properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
       properties.put(Context.PROVIDER_URL, ipAddress);
      
       ctx = new InitialContext(properties);
      
      


        • 1. Re: Cannot context.lookup(myQueue)
          jozeph78

          Either of these two calls pukes.

          topic = (Topic) ctx.lookup("queue/MC-QUEUE");
          connFactory = (ConnectionFactory) ctx.lookup("UIL2ConnectionFactory");



          So it can't lookup the UIL2ConnectionFactory or my queue. Something must be wrong with my context but I'm completely at a loss.