Nathan Meyers wrote:

On Tue, Jan 11, 2000 at 01:15:17PM -0500, Aaron Stromas wrote:
> it also worked on linux when i copied the _Stub class to the client. so,
> why doesn't the server find the stub to return to the client?

Ah, the real meat of the question. Answer: because RMI doesn't work that
way.

RMI doesn't send classfiles, either for the real class or the stub.
The client has to be able to find the stub in its own classpath.
RMI just sends data that is used with the stub class.

nathan,

when i read your comment i decided to step back and review my understanding of rmi. in  http://java.sun.com/products/jdk/1.2/docs/guide/rmi/codebase.html  it states
 

3.  The RMI registry returns a reference (the stub instance) to the requested class. If the class
     definition for the stub instance can be found locally in the client's CLASSPATH , which is always
     searched before the codebase, the client will load the class locally. However, if the definition for
     the stub is not found in the client's CLASSPATH, the client will attempt to retrieve the class
     definition from the remote object's codebase.
further down it says:
5.The class definition for the stub (and any other class(es) that it needs) is downloaded to the client.
my reading of the above document suggests that the rmiregistry indeed sends the stub to the client. am i wrong?
 
 

Nathan Meyers
[EMAIL PROTECTED]

> > Aaron Stromas wrote:
> >
> > > [EMAIL PROTECTED] wrote:
> > >
> > > > On Tue, Jan 11, 2000 at 02:00:00PM +0000, Aaron M. Stromas wrote:
> > > > > greetings,
> > > > >
> > > > > may someone have a hint as to what my problem may be and how to fix it.
> > > > > here is what is happening. i have a an rmi application with linux
> > > > > client  (jdk 1.2) and solaris server (jdk 1.3). the client throws an
> > > > > UnmarshalException. i could not figure out why it wa happening, so i
> > > > > tried the rmi example from the  "professional java server programming"
> > > > > which also throws the unmarshal exception. the client ran fine on the
> > > > > same solaris box where the server ran, so i tried the client from
> > > > > another solaris host, also running jdk 1.3 - runs fine.
> > > >
> > > > Don't the two vm's have to be the same, as the serial numbers will be
> > > > different between 1.2 and 1.3, which will cause Serialization errors?
> > > >
> > >
> > > i did not know that. is that a fact? if so, i have a serious problem :-(
> >
> > that does not appear to be so, at least, not on solaris - i installed
> > jdk1.2.1_04 and the client ran ok.
> >
>
> it also worked on linux when i copied the _Stub class to the client. so,
> why doesn't the server find the stub to return to the client?
> --
> Aaron Stromas
> Oracle Corp.
>
> "Tick-tick-tick!!!... ja, Pantani is weg...."
>                   (BRTN commentator, L'Alpe d'Huez, 1995 Tour de France)
>
>

Content-Description: Card for Aaron Stromas

----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

--
Aaron Stromas
Oracle Corp.

"Tick-tick-tick!!!... ja, Pantani is weg...."
                  (BRTN commentator, L'Alpe d'Huez, 1995 Tour de France)
 

begin:vcard 
n:Stromas;Aaron 
tel;fax:+1 703-708 7923
tel;work:+1 703 708 6821
x-mozilla-html:TRUE
url:http://www.oracle.com
org:Oracle;Advanced Technology Solutions
adr:;;196 Van Buren Street;Herndon;Virginia;22070;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Senior Principal consultant
x-mozilla-cpt:;7952
fn:Stromas, Aaron 
end:vcard

Reply via email to