rmi problem; does it work for anyone?
Mon Aug 11 16:10:00 GMT 2003
Judging from the archives, I don't seem to be the only one with problems
using RMI under gcj. Having read the warnings about mixing'n'matching,
I have compiled my client and server (I'm using the Calculator example
from sun; everything works with jdk-1.1) with gcj-3.3, and I'm using
the gcj-supplied rmiregistry.
You can find the code at:
I'm compiling the code as follows:
gcj-3.3 -ggdb CalculatorServer.java CalculatorImpl.java Calculator.java \
--main=CalculatorServer -o CalculatorServer
When I try to run the server, I get:
Trouble: java.rmi.RemoteException: connection failed to host: ; nested exception is:
UnknownHost is kind of puzzling, since the naming call is:
I get the same exception whether the hostname is "127.0.0.1", "localhost",
"0", "0.0.0.0", or my live IP address. All of these resolve properly
on my box, and, again, it works under the jdk.
If anyone out there is using rmi successfully and would like some
good karma by helping me figure this out, then feel free to contact
me privately. Alternatively, if this is just doomed to failure with
the gcj code in its present state, as the historical record at least
suggests it might be, then it'd be nice to hear that from those who know.
Finally, a workaround might suffice for my needs, although I'd prefer
to get RMI working properly.
I'm using debian linux, x86, with the following packages:
ii gcj 3.3-2 The GNU Java compiler.
ii gcj-3.3 3.3.1-1 The GNU compiler for Java(TM)
ii libgcj-common 3.3.1-1 Java runtime library (common files)
ii libgcj4 3.3.1-1 Java runtime library for use with gcj
ii libgcj4-dev 3.3.1-1 Java development headers and static library
I am happy to post any and all relevant details, but I think I'll stop
now and await further guidance as to whether such details are needed
or wanted. Any assistance is welcome.
More information about the Java