From owner-freebsd-java Tue Mar 7 12: 9:39 2000 Delivered-To: freebsd-java@freebsd.org Received: from boca.livius.net (boca.RO.EU.net [193.226.128.210]) by hub.freebsd.org (Postfix) with ESMTP id 08B1637BB4E for ; Tue, 7 Mar 2000 12:09:27 -0800 (PST) (envelope-from ilg@livius.net) Received: from ilglibretto (ilg-pc.ro.eu.net [193.226.128.201]) by boca.livius.net (8.9.2/8.9.1) with SMTP id AAA40912 for ; Wed, 8 Mar 2000 00:07:18 +0200 (EET) (envelope-from ilg@livius.net) From: "Liviu Ionescu" To: Subject: RMI server registration bug? Date: Tue, 7 Mar 2000 22:09:16 +0200 Message-ID: <001301bf8871$048a07a0$c980e2c1@ro.eu.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2377.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Importance: Normal Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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