This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: rmi problem; does it work for anyone?
- From: Bryce McKinlay <bryce at mckinlay dot net dot nz>
- To: "tlewis at mindspring dot com" <tlewis at mindspring dot com>,java at gcc dot gnu dot org
- Date: Tue, 12 Aug 2003 17:16:36 +1200
- Subject: Re: rmi problem; does it work for anyone?
On Tuesday, Aug 12, 2003, at 04:10 Pacific/Auckland,
tlewis@mindspring.com wrote:
Judging from the archives, I don't seem to be the only one with
problems
using RMI under gcj.
When I try to run the server, I get:
Trouble: java.rmi.RemoteException: connection failed to host: ; nested
exception is:
java.net.UnknownHostException:
UnknownHost is kind of puzzling, since the naming call is:
Naming.rebind("rmi://127.0.0.1:1099/CalculatorService", c);
I took a quick look at java/rmi/Naming.java and saw an obvious problem.
It is trying to parse the rmi: URI by sticking "http:" in front of it
and parsing it as a url:
URL u = new URL("http:" + name);
So basically, this code doesn't work. The solution is to implement the
new java.net.URI class (currently its just a stub), and use that to
parse the rmi: address.
Regards
Bryce.