File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes ConnectionException under Win ME Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "ConnectionException under Win ME" Watch "ConnectionException under Win ME" New topic
Author

ConnectionException under Win ME

Mike Southgate
Ranch Hand

Joined: Jul 18, 2003
Posts: 183
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


ms<br />SCJP, SCJD
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ConnectionException under Win ME
 
Similar Threads
Web logic server....
Connection Exception with RMI
Help with FTP transfer
Exception: Connection refused to host
why is it necessary for unLock() to check clientID?