• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot bind on Windows 95

 
Farouk Mohamed1
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The server is not able to bind to the RemoteConnectionFactory on windows 95 giving a UnknownHostException.
Has anyone tried it on windows 95 or windows 98
Please reply
Farouk
 
Bal Sharma
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please explain more detail with code; how you did for binding as well as for lookup? Oh! yeah I had also problem but my box is WindowMe. Are we talking same RMI problem? Oh! boy I am not sure. RemoteConnectionFactory ??? If not never mind.
- Bal
 
Farouk Mohamed1
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey
Thanks for some reply atleast,consoling right let me explain you
in detail.
When i start my server i bind using
registry = java.rmi.registry.LocateRegistry.createRegistry(Integer.parseInt(portNo));
host = java.net.InetAddress.getLocalHost().getHostAddress();
serviceName = "/FlightServices:" + Integer.parseInt(portField.getText());
URL = "rmi://" + host + serviceName;
rc = new RemoteConnectionFactory(dblocation);
Naming.rebind(URL, rc);
This is how i do the rebind, RemoteConnectionFactory is just theserver object ok, dont worry about it it is the rebind which is doing something funny
I get a UnknownHostException when i do this did you do it this way, did u have any problem ... Please reply
Win95 gives this problem, Anyone please
Farouk
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it work when you're dialed in to the net? It might be an issue with Win95 when you're offline, but my recollection is very vague indeed.
What is the result of "rmi://" + host + serviceName? Are you very sure you've got the URL syntax correct?
When your RMI registry is always local to the server, why not simply use the 127.0.0.1 loopback IP address?
- Peter
 
Bal Sharma
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:
I am beginnner and learning RMI. My machine is WindowME. I had following code for Server and Client.

Once I complile these files with javac. I go for rmic then use start java -Djava.security.policy=server.policy myServer AND java -Djava.security.policy=client.policy myClient. I do have policy files too. It is working for me this tiny problem.
Hope it helps and gives you some clue. -Bal
 
Farouk Mohamed1
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks ,
Peter: Even when connected to internet it is raising this exception. I will try today with the loopback IP and see what is#
happening
Thanks for your help
Farouk
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm especially mystified by the fact that there appears to be a port following the entire URL: rmi://machine/name:port rather than rmi://machine:port/name as you'd expect - or am I wrong?
- Peter
[This message has been edited by Peter den Haan (edited December 07, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic