This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/7938] java-rmi-problem
- From: "norbertf at gmx dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Aug 2003 18:50:10 -0000
- Subject: [Bug libgcj/7938] java-rmi-problem
- References: <20020916142600.7938.norbertf@gmx.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7938
------- Additional Comments From norbertf at gmx dot net 2003-08-02 18:50 -------
Subject: Re: java-rmi-problem
hi andrew,
i have just checked out the latest gcc/gcj sources (3.4) from cvs and
compiled them on my mandrake 9.1 system. I recompiled my tests, using
the Makefile i provided in the last mail.
Now the tests work!!!
But there are two minor issues remaining:
1) There is no "java.net.BindException" when calling
LocateRegistry.createRegistry(port) on a port where another RMI-Registry
already sits.
you can test it by starting the server twice:
./testsrv &
./testsrv
The problem with this behaviour is: An application might believe that it
is the initial creator and owner of the registry - which is not true in
this case. Without knowing, it might use the registry served by another
application using the same port, "confusing" the other application.
Having a quick look at the code, i think the problem might be in the
code of the constructor in class UnicastConnectionManager, where the
IOException is just "swallowed".
this is what the JDK reports - i think GCJ should have a similar
behaviour:
----------------------------
Exception in thread "main" java.rmi.server.ExportException: Port already
in use: 7777; nested exception is:
java.net.BindException: Address already in use
----------------------------
2) The other issue is that JDK and GCJ are not compatible. And i don't
understand why. I have used the same rmic (gcj) for generating the stubs
and skeletons. When i mix my gcj-RMI-client and RMITestServer invoked
with the JDK, things don't work properly (for instance in this case only
the method calls "status" and "com3" work.)
regards,
norbert