🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #262

RMI question

#262
From: George
Date: Sun, 21 Mar 2004 07:00
37 lines
2592 bytes
I just started learning Java RMI and am having a problem getting my first
server up and running.

I am using JBuilder X Foundation on Win 98.  I have a project called Test
located at C:\ATest.  There are 3 source files in a package called test
located at C:\ATest\src\test.  The class files go to C:\ATest\classes\test.
The 3 source files are WeatherIntf.java  (the remote interface),
WeatherServer.java (the server program), and RMIdemo.java (the client
program).  (Yes, this is the example program from Peter van der Linden's
book Just Java.)

I build the project in JBuilder.  Then from a DOS window I run the rmic on
WeatherServer.class to generate the stub and skeletons (I don't see a way to
do this in JBuilder X Foundation).  These two files go to
C:\ATest\classes\test  (i.e same directory as all other classes in project).
I then start the RMIRegistry from Tools | RMIRegistry  in JBuilder.  I then
run WeatherServer from JBuilder using a runtime configuration set up with a
policy file that grants the required socket permissions (connect and
accept).

At this point I get the following error:

RemoteException occurred in server thread; nested exception is:
 java.rmi.UnmarshalException: error unmarshalling arguments; nested
exception is:
 java.lang.ClassNotFoundException: test.WeatherServer_Stub

In the output window in JBuilder I also see the following fragment along
with a list of other paths:
C:\JBUILDERX\JDK1.4\bin\javaw -classpath "C:\ATest\classes;".......

Since C:\ATest\classes is in the class path, I don't understand why
test.WeatherServer_Stub cannot be found.  It is in the very same directory.

Any help would be greatly appreciated.
Thanks
George
Technical Details
Message-ID: <405d1169@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,8ff13b2f02af21f5,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2004-03-20 20:09:23 PST
From: "George" <geo@geo1.com>
Newsgroups: borland.public.jbuilder.java.api
Subject: RMI question
Date: Sat, 20 Mar 2004 23:00:01 -0800
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 12.75.178.126
Message-ID: <405d1169@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1079841129 12.75.178.126 (20 Mar 2004 19:52:09 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail