Unable to Connect to Rabbit MQ server

660 views
Skip to first unread message

swaroopa regulavalasa

unread,
Oct 3, 2014, 12:40:31 AM10/3/14
to rabbitm...@googlegroups.com
HI Team 

I am Swaroopa working for Sterling B2B Integrator .

We are trying to connect through Rabbit MQ , i successfully installed it and able to login but never was able to connect .

1.Sterling B2B support Active mq API and hence we assume it will be able to connect rabit mq . We are based on Java application 
2.Do we need to install any 3rd party jars before we try to connect rabbit mq?if yes, where can we get it 
3.Does it support JNDI ? or Non- JNDI?
4.What is the default connection and context factory we should use ?

Please read my white paper which i wrote for different providers and integrating with Sterling B2B 



I really really appreciate your response. 

swaroopa regulavalasa

unread,
Oct 3, 2014, 12:48:22 AM10/3/14
to rabbitm...@googlegroups.com
Error in logs 

2014-10-03 14:29:00.301] ERROR Exception while starting the JMSAsyncRecieveAdapter_swaroopa_rabbitmqso shutting down
[2014-10-03 14:29:00.301] ERROR [1412310540301] Exception while creating the connection factory with key swaroopa_rabbitmq_1811030629
[2014-10-03 14:29:00.301] ERRORDTL [1412310540301]com.sterlingcommerce.woodstock.services.jms11.impl.exceptions.JMS11Exception: Exception while creating the connection factory with key swaroopa_rabbitmq_1811030629
	at com.sterlingcommerce.woodstock.services.jms11.impl.ConnectionFactoryMapImpl.createConnectionFactory(ConnectionFactoryMapImpl.java:191)
	at com.sterlingcommerce.woodstock.services.jms11.impl.ConnectionFactoryMapImpl.findFactory(ConnectionFactoryMapImpl.java:117)
	at com.sterlingcommerce.woodstock.services.jms11.impl.ConnectionFactoryMapImpl.findFactory(ConnectionFactoryMapImpl.java:46)
	at com.sterlingcommerce.woodstock.services.jms11.impl.utils.JMSAsyncReceiveHelper.setUpConnectionFactory(JMSAsyncReceiveHelper.java:222)
	at com.sterlingcommerce.woodstock.services.jms11.impl.utils.JMSAsyncReceiveHelper.start(JMSAsyncReceiveHelper.java:171)
	at com.sterlingcommerce.woodstock.services.jms11.impl.JMSAsyncRecieve.startUpAsyncMessageListener(JMSAsyncRecieve.java:229)
	at com.sterlingcommerce.woodstock.services.jms11.impl.JMSAsyncRecieve.startupAdapter(JMSAsyncRecieve.java:76)
	at com.sterlingcommerce.woodstock.services.IAdapterImpl.startAdapter(IAdapterImpl.java:261)
	at com.sterlingcommerce.woodstock.services.controller.StartAdapterThread.run(StartAdapterThread.java:104)
	at java.lang.Thread.run(Thread.java:662)
Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: com.rabbitmq.jms.admin.RMQConnectionFactory [Root exception is java.lang.ClassNotFoundException: com.rabbitmq.jms.admin.RMQConnectionFactory]
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
	at javax.naming.InitialContext.init(InitialContext.java:223)
	at javax.naming.InitialContext.<init>(InitialContext.java:197)
	at com.sterlingcommerce.woodstock.services.jms11.impl.ConnectionFactoryMapImpl.JNDIlookUpConnectionFactory(ConnectionFactoryMapImpl.java:305)
	at com.sterlingcommerce.woodstock.services.jms11.impl.ConnectionFactoryMapImpl.createConnectionFactory(ConnectionFactoryMapImpl.java:161)
	... 9 more
Caused by: java.lang.ClassNotFoundException: com.rabbitmq.jms.admin.RMQConnectionFactory
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)
	at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
	... 14 more


Michael Klishin

unread,
Oct 3, 2014, 3:22:42 AM10/3/14
to rabbitm...@googlegroups.com, swaroopa regulavalasa
 On 3 October 2014 at 08:48:29, swaroopa regulavalasa (swaroopa.r...@gmail.com) wrote:
> Caused by: javax.naming.NoInitialContextException: Cannot
> instantiate class: com.rabbitmq.jms.admin.RMQConnectionFactory
> [Root exception is java.lang.ClassNotFoundException: com.rabbitmq.jms.admin.RMQConnectionFactory]
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)

It's not incredibly polite (or effective) to post stack traces without any
other information but the root cause is above.

Sounds like you need RabbitMQ JMS client to be on JVM classpath.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Michael Klishin

unread,
Oct 3, 2014, 6:38:21 AM10/3/14
to swaroopa regulavalasa, rabbitm...@googlegroups.com
+rabbitmq-users

On 3 October 2014 at 14:13:39, swaroopa regulavalasa (swaroopa.r...@gmail.com) wrote:
> We are trying to connect through Rabbit MQ , i successfully installed
> it and able to login but never was able to connect .
>
> 1.Sterling B2B support Active mq API and hence we assume it will
> be able to connect rabit mq . We are based on Java application

Using what protocol?

> 2.Do we need to install any 3rd party jars before we try to connect
> rabbit mq?if yes, where can we get it
> 3.Does it support JNDI ? or Non- JNDI?
> 4.What is the default connection and context factory we should
> use ?

The JMS-compatible client is only offered in Pivotal RabbitMQ distribution,
which requires a commercial license.

If you are trying to integrate with RabbitMQ from your product, your best
bet is to use RabbitMQ's core protocol. See http://www.rabbitmq.com/getstarted.html,
the Java client used in those tutorials is an AMQP 0-9-1 one and is open source
(MPL or GPLv2, plus APL2 in the upcoming 3.4.0 release).

swaroopa regulavalasa

unread,
Oct 9, 2014, 7:31:27 PM10/9/14
to Michael Klishin, rabbitm...@googlegroups.com
Good Morning Michael 

Thanks for your reply. 

Our product used Java API to connect rabbit MQ . We will be the clients who will be connecting to Rabbit MQ. 

1. I need some suggestions on what is default context factory , connection factory etc(very important )
2.And i am not able to login into Rabbit MQ dashboard with the from a remote system , always i need to login to the server and access it as 127.0.01 ? do we have a way to fix this

Here is the documentation of our JMS client 


We appreciate your response. 

Thanks 
Swaroopa

Michael Klishin

unread,
Oct 10, 2014, 1:50:22 AM10/10/14
to swaroopa regulavalasa, rabbitm...@googlegroups.com
 On 10 October 2014 at 03:31:32, swaroopa regulavalasa (swaroopa.r...@gmail.com) wrote:
> 1. I need some suggestions on what is default context factory
> , connection factory etc(very important )

I'm not sure I understand what you're asking. Your client seems to be a JMS client for some
IBM product. Commercial RabbitMQ version comes with a JMS API client but it still uses
RabbitMQ's main protocol under the hood.

You need to use that client and refer to its documentation.

> 2.And i am not able to login into Rabbit MQ dashboard with the from
> a remote system , always i need to login to the server and access
> it as 127.0.01 ? do we have a way to fix this

See «"guest" user can only connect via localhost» on http://www.rabbitmq.com/access-control.html.
Reply all
Reply to author
Forward
0 new messages