File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes Can you help me to solve this rmi connection problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Can you help me to solve this rmi connection problem" Watch "Can you help me to solve this rmi connection problem" New topic
Author

Can you help me to solve this rmi connection problem

bryan Lee
Greenhorn

Joined: Mar 30, 2002
Posts: 13
Hi, all,
when I write a simple rmi application, when i start to run it, it gave me the following error messages: can some body tell me what's wrong ?ArithClient: Connection refused to host: 127.0.0.1; nested exception is:
java.net.ConnectException: Connection refused: connect
java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested except
on 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:18
)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:83)
at ArithClient.main(ArithClient.java:74)
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(RMIDirec
SocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaste
SocketFactory.java:122)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
... 6 more
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
bryan
Welcome to the Java Ranch, we hope you’ll enjoy visiting as a regular however,
your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!


Dave
bryan Lee
Greenhorn

Joined: Mar 30, 2002
Posts: 13
found the problem.
due to java.policy
Jayprakash Acharya
Greenhorn

Joined: Sep 28, 2004
Posts: 1
Hi Bryan,

Can you please share the details of the resolution. I am getting a similar problem.

Thanks a lot in advance.

- Jayprakash

PS: Please be specific, I am not a techie guy! :-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can you help me to solve this rmi connection problem