Error while connecting with Universal messaging using AMQP

Hello All,

I am trying to connect with Universal messaging using AMQP protocol from Java program. But I am getting below error:

“ javax.naming.NamingException: Unable to load property file: amqp://lcoalhost:5672. [Root exception is amqp:\lcoalhost:5672 (The filename, directory name, or volume
label syntax is incorrect)]at org.apache.qpid.jms.jndi.JmsInitialContextFactory.getInitialContext( at javax.naming.spi.NamingManager.getInitialContext(”

I have done all initial steps in Enterprise Manager
like enabled the Protocol AMQP config, created nsp interface with port 5672

Also added all qpid*jars in java build path.

I am using below code in java class to connect: Also attached

env.put(Context.INITIAL_CONTEXT_FACTORY, System.getProperty(“CONTEXT_FACTORY”, “org.apache.qpid.jms.jndi.JmsInitialContextFactory”));
env.put(Context.PROVIDER_URL, System.getProperty(“PROVIDER_URL”, “amqp://lcoalhost:5672”));

Can anyone help me here to connect with Universal messaging with AMQP using java program (7.07 KB)


What is your IS/UM version that you are dealing connection issue here?


Hello Team,

We are using 9.12 IS/UM.

Ankush Sharma


did you notice the typo in URL?

lcoalhost instead of localhost


Good eyes that’s a very good catch :slight_smile:

1 Like

Hello Folks,

Again I am getting same error :
"error:javax.naming.NamingException: Unable to load property file: amqp://localhost:5672. [Root exception is amqp:\localhost:5672 (The filename, directory name, or volume label syntax is incorrect)]
at org.apache.qpid.jms.jndi.JmsInitialContextFactory.getInitialContext(
at javax.naming.spi.NamingManager.getInitialContext(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.init(
at javax.naming.InitialContext.(
at JMSTest.doIt(
at JMSTest.main(

I believe for this to work, we need to create a jndi properties file with following information like

And in provider URL we have to provide the location of this JNDI file instead.


This has been resolved and the post has not been updated by the user.