1 Reply Latest reply on Jun 18, 2007 10:04 AM by adrian.brock

    Can't lookup queue/B

    happytour

      Greetings,

      In a simple piece of code Im doing the following:

      InitialContext ctx = new InitialContext();
       Queue q = (Queue)ctx.lookup ("queue/B");


      This raises the following exception:

      Exception in thread "main" java.lang.ClassCastException: javax.naming.Reference
       at ro.happytour.happyledger.jms.client.JMSProviderClient.main(JMSProviderClient.java:13)


      Looking at the object returned by the lookup, it appears to be of type javax.naming.Reference. Could someone please help as I already posted this message several time, without any reply ?

      Many thanks in advance,

      Nicolas

        • 1. Re: Can't lookup queue/B

          I already moved this question to the jndi forum once!!!

          JNDI Lookup problems are not JMS questions.
          See the FAQ linked at the the top of that forum on how to debug the problem and the most
          common problems with JNDI (in this case missing classes from your classpath).