This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]