File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
pramod talekar
Ranch Hand
Posts: 323
Eclipse IDE Java Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Anurag Verma
Ranch Hand
Posts: 166
Hibernate Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 323
Eclipse IDE Java Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Anurag.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic