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

    Cannot context.lookup(myQueue)

    Joseph Hirn Newbie

      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);