• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI Problem

 
Paulsen Schmid
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I'm facing the following problem:
If I start rmiregistry on the default port (I think its 1099) everything works fine.
If I start rmiregistry on another port, lets say 1098 there is an error starting the database-server:
java.rmi.ConnectException: Connection refused to host: <here comes my ip adress>
The error is in the line:
Naming.rebind(url, req);
As url i'm using "FlightData" and req is my rmi-object. Do I have to use another url? Do I have to specify the port? I didn't find anything helpful in the Java Tutorial by Sun.
Please help
Paulsen
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using the URL: 'rmi://127.0.0.1:1098/FlightData'
You can also read about it at: 'http://developer.java.sun.com/developer/onlineTraining/rmi/RMI.html'
/Ren´┐Ż
[This message has been edited by Rene Larsen (edited October 31, 2001).]
 
Paulsen Schmid
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help.
I'm now using rmi://localhost:<portnumber>/FlightData
as url and it works fine.
I also discovered, that I can use LocateRegistry.createRegistry(port);
in my server.
Is there a difference between the method call and the start of the rmiregistry program? I read that you have to unset the CLASSPATH before starting rmiregistry. How about that in my new server with the createRegistry command. It needs a CLASSPATH. Are there any problems? (I encountered no problems, but that does not mean there are none)
Thanks
Paulsen
 
Paulsen Schmid
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, can anybody help?
Thanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I don't think that that is a problem.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic