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]

rmi problem; does it work for anyone?


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:

http://developer.java.sun.com/developer/onlineTraining/rmi/RMI.html#RMIImplementations

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:
        java.net.UnknownHostException:

UnknownHost is kind of puzzling, since the naming call is:

       Naming.rebind("rmi://127.0.0.1:1099/CalculatorService", c);

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.

--
Todd Lewis
tlewis@mindspring.com


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