Meaningless Drivel is fun!*
The moose likes JBoss/WildFly and the fly likes CommunicationException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "CommunicationException" Watch "CommunicationException" New topic
Author

CommunicationException

Bijoy Sivan
Greenhorn

Joined: Jan 30, 2003
Posts: 6
Hi all,
I am doing development on a W2K machine and have developed an ejb and it is working fine in the local machine. Now I have deployed the ejb in JBOSS server which is running in a Redhad machine. In the redhad machine I am able to access the ejb. When I try to access it from some other machine I get the following exception.

J:\jboss-3.0.3_tomcat-4.1.12\JBOSS Sample\bean1\classes>java FirstClient
Exception in thread "main" javax.naming.CommunicationException. Root exception
is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exce
ption is:
java.net.ConnectException: Connection refused: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:456)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at FirstClient.main(FirstClient.java:11)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at java.net.Socket.<init>(Socket.java:290)
at java.net.Socket.<init>(Socket.java:118)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:122)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
... 8 more
I have set the jndi.properties file to point to the Redhad machine.
Please help me.
Thanks in advance
Bijoy Sivan K
Bijoy Sivan
Greenhorn

Joined: Jan 30, 2003
Posts: 6
Please refer the following links for answers
http://www.jboss.org/forums/thread.jsp?forum=141&thread=27775
http://www.jboss.org/forums/thread.jsp?forum=141&thread=27300
Robert Fuller
Greenhorn

Joined: Jul 30, 2004
Posts: 1
My problem had similar manifestations and was resolved by passing the following option to the jvm:


-Djava.rmi.server.hostname=127.0.0.1
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CommunicationException
 
Similar Threads
Cannot Start RMI Server
Can you help me to solve this rmi connection problem
RMI Server problem
EJB romte call Exception,"Connection refused to host: win2003..."
help jboss