🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: RMI question

#286
From: Petar Banicevic
Date: Wed, 31 Mar 2004 21:41
112 lines
5081 bytes
I am not good in explaining things, however, if you need more help send me a
mail to petar.banicevic@siemens.com.nospam (I can't use newsgroups from the
office) and I can give you an examples of RMI server, options and security
file ... etc...  (remove nospam).

P.

PS: please don't send attachments to mail unless they are zipped with a
password or rarred (with or without) a password.

"George" <geo@geo1.com> wrote in message
news:406a8078@newsgroups.borland.com...
> Whoa Petar,
>
> I just logged on to post that I had found what the problem was and here I
> see your post!
>
> Even after making sure (as John McGrath suggested) that the stub was not
> getting erased when I started the server, I found the same problem.  After
> some stumbling around in the documentation, I got it to work.
>
> Yes the "problem" is indeed that you have to
> pass -Djava.rmi.server.codebase=file:///ATest/classes/  to the VM.  So you
> have to set this in the runtime configuration as one of the parameters to
be
> passed.  Of course the path I am setting in codebase is already in the
> classpath that JBuilder is passing to javaw.  So I don't quite understand
> what's going on.  Maybe somebody can explain.
>
> Just a note of documentation
> regarding -Djava.rmi.server.codebase=file:///ATest/classes/
> Three slashes are required after file: on Windows (well at least 98!); (2
> slashes wont work);  also the slash after classes is required!
>
> Also, I was wrong when I said in my last post that I don't see a way to
> generate stubs from the IDE in JBuilder X Foundation.  Well as it turns
out
> you can right click the file in the Project pane and from the Properties
> menu item indicate that you want rmi stub to be generated.
>
> Thank you guys for the help.
> George
>
>
> "Petar Banicevic" <petar2@kupi.biz> wrote in message
> news:4065f86c@newsgroups.borland.com...
> > Perhaps this isn't a case, but anyway: don't forget about
> > "java.rmi.server.codebase" ...
> >
> > Petar
> >
> >
> > "George" <geo@geo1.com> wrote in message
> > news:405d1169@newsgroups.borland.com...
> > > 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: <406b3c80@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <405d1169@newsgroups.borland.com> <4065f86c@newsgroups.borland.com> <406a8078@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,8ff13b2f02af21f5
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2004-03-31 14:10:20 PST
From: "Petar Banicevic" <petar2@kupi.biz>
Newsgroups: borland.public.jbuilder.java.api
References: <405d1169@newsgroups.borland.com> <4065f86c@newsgroups.borland.com> <406a8078@newsgroups.borland.com>
Subject: Re: RMI question
Date: Wed, 31 Mar 2004 23:41:28 +0200
Lines: 114
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 193.198.131.44
Message-ID: <406b3c80@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1080769664 193.198.131.44 (31 Mar 2004 13:47:44 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail