[jboss-user] [EJB 3.0] - Problem with remote JNP. Can't connect to remote JBoss
Ilya Muromtsev
do-not-reply at jboss.com
Wed Jun 30 02:41:34 EDT 2010
Ilya Muromtsev [http://community.jboss.org/people/timeking] created the discussion
"Problem with remote JNP. Can't connect to remote JBoss"
To view the discussion, visit: http://community.jboss.org/message/550299#550299
--------------------------------------------------------------
When startup JBoss localy it is works fine: all beans are works well.
I want to separate server and remote client.
But when I trying to connect to *+remote+* +JBoss+ by changing+ *java.naming.provider.url*+ property
from +jnp://127.0.0.1:1099+
to +jnp://remote-JBoss-IP:1099+
in the *jndi.properties* file.
Resulted +jndi.properties+ file is:
> java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
> java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
> java.naming.provider.url=+jnp://remote-JBoss-IP:1099+
Then I recieve an exception:
> javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: server; nested exception is:
> java.net.UnknownHostException: server]
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:841)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
> at javax.naming.InitialContext.lookup(InitialContext.java:392)
> at ru.net.wingbull.shop.client.ApplicationMain.createAndShowGUI(ApplicationMain.java:28)
> at ru.net.wingbull.shop.client.ApplicationMain.access$000(ApplicationMain.java:16)
> at ru.net.wingbull.shop.client.ApplicationMain$1.run(ApplicationMain.java:45)
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> Caused by: java.rmi.UnknownHostException: Unknown host: server; nested exception is:
> java.net.UnknownHostException: server
> at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:598)
> at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
> at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
> at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
> at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
> at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728)
> ... 13 more
> Caused by: java.net.UnknownHostException: server
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
> at java.net.Socket.connect(Socket.java:529)
> at java.net.Socket.connect(Socket.java:478)
> at java.net.Socket.<init>(Socket.java:375)
> at java.net.Socket.<init>(Socket.java:189)
> at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
> at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
> at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
> ... 18 more
> Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: javax.naming.CommunicationException [Root exception is java.rmi.UnknownHo
> stException: Unknown host: server; nested exception is:
> java.net.UnknownHostException: server]
> at ru.net.wingbull.shop.client.ApplicationMain$1.run(ApplicationMain.java:48)
> at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
> at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
> at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
> at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
> at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
> at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> Caused by: javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: server; nested exception is:
BTW, remote machine localy named as "*server*", and I checked (using +tcpview+ tool) that client application establish connection with remote-JBoss on 1099 but then throwing this exception. How to avoid it?
Ilya
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/550299#550299]
Start a new discussion in EJB 3.0 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100630/33732766/attachment.html
More information about the jboss-user
mailing list