wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Unable to connect to java.naming.provider.url value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Unable to connect to java.naming.provider.url value" Watch "Unable to connect to java.naming.provider.url value" New topic
Author

Unable to connect to java.naming.provider.url value

pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Hi,

Today is my first day with jms & jndi and I'm using ActiveMQ 5.4.3.
I've created a code to test it, but when I run the code I get
javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused: connect


This is my jndi.properties file in the classpath


I went over my ActiveMQ configuration file and saw this tag :-


So, I changed it to localhost and reran my code but got the same error, also changed the provider url to 0.0.0.0 in jndi.properties and reran the program but it gave the same error with 0.0.0.0 instead of localhost.

Please help.


Thanks,
Pramod
Anurag Verma
Ranch Hand

Joined: Mar 30, 2012
Posts: 124

you have already mentioned the issue here -
Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection refused: connect


Check whether server is running on 61616 port.
pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Thanks Anurag.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to connect to java.naming.provider.url value
 
Similar Threads
Help with sample JMS program. Getting NoClassDefFoundError, ClassNotFoundException
Where is the jndi.properties file located in j2ee.jar File
Configure JBoss to connect to remote queues
wrong broker address with multicast lookup
ActiveMQ dynamic queues