Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Mar 2000 22:09:16 +0200
From:      "Liviu Ionescu" <ilg@livius.net>
To:        <freebsd-java@freebsd.org>
Subject:   RMI server registration bug?
Message-ID:  <001301bf8871$048a07a0$c980e2c1@ro.eu.net>

next in thread | raw e-mail | index | archive | help
I am using jdk1.1.8 on 3.4-RELEASE and I am constantly getting error
messages while trying to start a RMI server (sources are from jGuru RMI
tutorial, downloaded from Sun):

develop:~/java/rmi/exercises/SimpleBankingSystem/solution$ java
BankSystemServer
Failure during Name registration: java.rmi.ServerException: Server
RemoteException; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is:
        java.lang.ClassNotFoundException: BankManagerImpl_Stub


the BankManagerImpl_Stub.class is obviously present (I tried even to copy it
in the first directory in CLASSPATH, with no change).

apparently the problem is not related to class presence, since running
java -verbose showed the class as loaded:

...
[Loaded sun/rmi/transport/KeepAlive.class from
/usr/local/jdk1.1.8/lib/classes.zip]
[Loaded ./AccountImpl.class]
[Loaded ./Account.class]
[Loaded ./AccountImpl_Skel.class]
[Loaded ./AccountImpl_Stub.class]
[Loaded ./BankManagerImpl_Skel.class]
[Loaded ./BankManagerImpl_Stub.class]
[Loaded java/rmi/Naming.class from /usr/local/jdk1.1.8/lib/classes.zip]
...


running the class in jdb was possible up to a point where source code was no
longer available.

as shown in the jdb session below, the problem occurs in Naming.rebind; I
tried on two different ports (1099 and 1100), but it made no difference.
stopping the rmiregistry generated a different (normal) message:
"java.net.ConnectException: Connection refused".

even more strange, trying repeatedly from different accounts at different
moments led most of the times to displaying the error, but there were cases
(apparently first trials) when the error was not displayed. however the
server was probably not running, since client attempts to connect showed no
reaction (and no error messages too...).

anyone else encountered this error?


regards,

Liviu Ionescu
ilg@livius.net




...
Breakpoint hit: java.rmi.Naming.rebind (Naming:108)
main[1] list
104
105             if (obj == null)
106                 throw new NullPointerException("cannot bind to null");
107
108     =>      registry.rebind(getName(url), obj);
109            }
110
111            /**
112             * Returns an array of strings of the URLs in the registry.
main[1] step
main[1]
Breakpoint hit: sun.rmi.registry.RegistryImpl_Stub.rebind
(RegistryImpl_Stub:125)
main[1] next
main[1]
Breakpoint hit: sun.rmi.registry.RegistryImpl_Stub.rebind
(RegistryImpl_Stub:127)
main[1] step up
main[1]
Breakpoint hit: BankSystemServer.main (BankSystemServer:33)
main[1] list
Unable to find BankSystemServer.java
main[1] use .
main[1] list
29
30             // Register an external name for the service
31             try {
32               Naming.rebind("//localhost:1100/BankSystem", bm);
33      =>     } catch (RemoteException remoteException) {
34               System.err.println(
35                 "Failure during Name registration: " +
36                 remoteException);
37             } catch (MalformedURLException malformedException) {
main[1] next
main[1]
Breakpoint hit: BankSystemServer.main (BankSystemServer:34)
main[1] list
30             // Register an external name for the service
31             try {
32               Naming.rebind("//localhost:1100/BankSystem", bm);
33             } catch (RemoteException remoteException) {
34      =>       System.err.println(
35                 "Failure during Name registration: " +
36                 remoteException);
37             } catch (MalformedURLException malformedException) {
38               System.err.println(
main[1]



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001301bf8871$048a07a0$c980e2c1>