VMware Cloud Community
bullet_hyperic
Contributor
Contributor

JMS Connection refused

I am using new JBOSS 5.0.0.GA and jboss messaging 2.0.0 to run my sample jms code ...
for the following jndi properties :
props.setProperty"java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
props.setProperty("java.naming.provider.url","my ip:1099");


im geting this error


log4j:WARN No appenders could be found for logger (org.jnp.interfaces.NamingContext).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.1.5:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server 192.168.1.5:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.1.5:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1601)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:636)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:629)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at TestJboss.setupPTP(TestJboss.java:72)
at TestJboss.sendRecvAsync(TestJboss.java:87)
at TestJboss.main(TestJboss.java:114)
Caused by: javax.naming.CommunicationException: Failed to connect to server 192.168.1.5:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.1.5:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:276)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1572)
... 6 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.1.5:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:250)
... 7 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:266)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:246)
... 7 more
...Ip is correct ,but i can t figure outr the reason....same code works for jbossas4.X
0 Kudos
0 Replies