Thanks, that was the problem: I was trying to lookup the "amqp://..." directly.
-----Original Message----- From: Arnaud Simon [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 09, 2008 4:04 AM To: [email protected] Subject: Re: javax.naming.NamingException: scheme amqp not recognized Hi Shahbaz, I believe you are trying to lookup "amqp://guest:[EMAIL PROTECTED]/test?brokerlist='tcp://xxx.xxx.xxx.xxx:5672'" i.e. your code should do something like: ConnectionFactory conFac = (ConnectionFactory)ctx.lookup("amqp://guest:[EMAIL PROTECTED]/test?brokerlist='tcp://localhost:5672"); You cannot do that as the amqpURLContextFactory is not implemented. What you should do instead is lookup a connection factory that is defined in your jndi file. i.e. You code should be: ConnectionFactory conFac = (ConnectionFactory)ctx.lookup("qpidConnectionfactory"); Where qpidConnectionfactory is defined as follows: connectionfactory.qpidConnectionfactory = amqp://guest:[EMAIL PROTECTED]/test?brokerlist='tcp://localhost:5672' You can either specify your jndi property file location through the java.naming.provider.url property or explicitly load the properties in your code by doing something like: Properties properties = new Properties(); properties.load(this.getClass().getResourceAsStream("jndi.properties")); Context ctx = new InitialContext(properties); Hope this helps Arnaud ----- "Shahbaz Chaudhary" <[EMAIL PROTECTED]> wrote: > I'm getting a very strange error: javax.naming.NamingException: > scheme > amqp not recognized > > > > A third party vendor provides a bridge between JMS and their product. > I'm posting it here because the stack trace shows that the problem is > within the qpid name space. > > > > The following url is being parsed: > "amqp://guest:[EMAIL PROTECTED]/test?brokerlist='tcp://xxx.xxx.xxx.xxx:5672'" > > The code seems to strip out "amqp" but doesn't recognize it (this is > in > org.apache.qpid.jndi.ReadOnlyContext.lookup()) > > > > Instead of the amqp url, I took the tcp part of the url, and I > started > receiving "scheme tcp not recognized" error. > > > > Following is some more detail: > > javax.naming.NamingException: scheme amqp not recognized > > at > org.apache.qpid.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:250) > > at > javax.naming.InitialContext.lookup(InitialContext.java:392) > > ...vendor classes... > > JMSAdapter error: NamingException: scheme amqp not recognized > Resolved > name: null Remaining name: null with error > javax.naming.NamingException: > scheme amqp not recognized > > > > > > Shahbaz Chaudhary > > Genghis Fund > > 75 Broad > > New York, New York 10004 > > O: 212-220-2698 > > C: 347-334-1730 > > [EMAIL PROTECTED]
