File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI Connection Exception Help

 
Alan Morgan
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to test my application in server mode.
I start the RMI server and bind the object on a given ip address.

Then on my own machine in my DataConnector when I do Naming.lookup() I get an exception:

> Connection refused to host: 172.24.9.85

Now the problem is that this is my ip address and not the address I am trying to connect to.

I then tried Naming.list(ip) and I got the same exception.

Any thoughts ?

Thanks.
 
Alan Morgan
Ranch Hand
Posts: 113
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Alan Morgan:
Hi,

I am trying to test my application in server mode.
I start the RMI server and bind the object on a given ip address.

Then on my own machine in my DataConnector when I do Naming.lookup() I get an exception:

> Connection refused to host: 172.24.9.85

Now the problem is that this is my ip address and not the address I am trying to connect to.

I then tried Naming.list(ip) and I got the same exception.

Any thoughts ?

Thanks.



Worked it out.
Needed to add "rmi://" before the ip and ":1099" after the ip and before the object name.

Ah well I suppose this may help someone else who has a similar problem.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic