• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ConnectionException under Win ME

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My assignment works fine under Win XP and Win 2000. Under Win 98 and Win ME it gives an error. It was showing up as an IOException at first but that was only because RemoteException is a type of IOException. Turns out, it can create the registry OK by it can't register the server in it. I've copied my code below:
LocateRegistry.createRegistry(Integer.parseInt(port));
System.out.println("registry started:" + symbolicName);
Naming.rebind(symbolicName, this);
I see the message, but then I get a ConnectionException Connection Refused to host.
Can anyone tell me what I'm doing wrong?
ms
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does symbolicName have the port number in the String.
I found this in the API Documentation

Each method of the Naming class takes as one of its arguments a name that is a java.lang.String in URL format (without the scheme component) of the form:
//host ort/name

where host is the host (remote or local) where the registry is located, port is the port number on which the registry accepts calls, and where name is a simple string uninterpreted by the registry. Both host and port are optional. If host is omitted, the host defaults to the local host. If port is omitted, then the port defaults to 1099, the "well-known" port that RMI's registry, rmiregistry, uses.


Most importantly this part.

If port is omitted, then the port defaults to 1099, the "well-known" port that RMI's registry, rmiregistry, uses.


That's my guess.
btw, I used the default port 1099.
Mark
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic