Re: Creating manual Stub for the Remote Objects

Esmond Pitt <[email protected]> Tue, 26 Aug 2008 16:10:37 +1000
Newsgroups gmane.comp.java.sun.rmi
Organization Melbourne Software Company
Message-ID <20080826060903.NCOW15766.nskntotgx02p.mx.bigpond.com@toshibakx1wgjb>
Abdullah

> the client side as follows:
> 
> System.setProperty("java.rmi.server.codebase","ftp://.........etc"); 

The codebase should be set on the server side, not the client side, unless
the client is exporting RMI callbacks.

>  java.rmi.UnmarshalException: unrecognized method hash: method not=20
supported by remote object

This means that your remote stub is out of date with respect to the remote
interface. Regenerate it, and ensure the same version of the stub and remote
interface are deployed at both the server and the client (or the codebase).

If you're using 1.5 or later and you call
UnicastRemoteObject.exportObject(t, 0) you don't need to generate the stub
at all, which would eliminate this problem forever.

EJP

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html