Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 367
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 171
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 367
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Anurag.
 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic