This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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: 323

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: 128

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: 323

Thanks Anurag.
 
Have you checked out Aspose?
 
subject: Unable to connect to java.naming.provider.url value
 
It's not a secret anymore!