File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes java.rmi.ConnectException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "java.rmi.ConnectException" Watch "java.rmi.ConnectException" New topic


Jonathan Blok

Joined: Oct 16, 2009
Posts: 7
Hello everyone,

I am having a problem setting up my RMI connection. When executing this code:

I receive these errors:

When I telnet or portscan (which is my ip address given to me by a switch), I am not able to connect. However when I telnet or portscan I am able to connect to port 1099. The company I work at does use a proxy but I set Java to 'direct connection' in the Control Panel so I do not think the proxy is involved. I have also added an 'RMI' exception entry in my Windows XP firewall on port 1099. A tracert to takes one hop so I do not think that the switch is the problem.

My questions are these:
>Why does RMI try to connect to in stead of, where is this setting stored?
>Why doesn't work while does, any ideas what could be causing this?

Any help would be greatly appreciated.
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241

I think you're missing a collon in URL for your RMI. Try it like this:

Regards, Martin

I no good English.
rajshkhr pandey
Ranch Hand

Joined: Oct 14, 2009
Posts: 35
Hello to all,

Actually I am getting same error while developing the RMI application few days ago, so when I removed the Security Manager and applied appropriate policy the application worked.
Or either your RMIRegistry is not running
wood burning stoves
subject: java.rmi.ConnectException
It's not a secret anymore!