CommunicationException in jndi lookup()
rmorant Oct 18, 2001 1:48 PMDreistein wrote:
>in my localnetwork there is no problem to recive the jms messgae but over the internet i got always a timeout.
My problem is the same, but the exception throws at the next line:
QueueConnectionFactory queueFactory = (QueueConnectionFactory)_context.lookup(_queueConnectionFactory);
because it is looking for a local IP (192.168.1.200), but the router's Internet IP is other.
javax.naming.CommunicationException. Root exception is java.rmi.ConnectIOExcept
ion: Exception creating connection to: 192.168.1.200; nested exception is:
java.net.NoRouteToHostException: Host unreachable: no further informatio
n
java.net.NoRouteToHostException: Host unreachable: no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
at java.net.Socket.(Socket.java:269)
at java.net.Socket.(Socket.java:98)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:29)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:124)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:497)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:194
)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:178)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:87)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:354)
at com.albasoft.dbsync.ExecControler.jmsConnect(ExecControler.java:120)
at com.albasoft.dbsync.ExecControler.downloadMessages(ExecControler.java
Then:
1. Find the remote server using Context.PROVIDER_URL enviroment property.
2. gets the jndi InitialContext
but try to find the server with his local IP.
Is it possible to use the URL passed in the Context.PROVIDER_URL instead of the IP passed from de JNDI Server?
How can i use JBossMQ throught a router?
Greetings Rafa