FW: Tiger no stub features

"Wong, Seck {PBSG}" <[email protected]>
Newsgroups gmane.comp.java.sun.rmi
Message-ID <5A44E1DD042A894DBA16C80B4DDBBC0D024A1B17@pepwmu00153.corp.pep.pvt>
 Problem resolved after implementation as adviced by attach'd. Thanks.


Seck Wong
972 963 1711

-----Original Message-----
From: Peter Jones - JavaSoft East [mailto:[email protected]]
Sent: Friday, September 30, 2005 1:30 AM
To: [email protected]
Subject: Re: Tiger no stub features

> Anybody try out the java.rmi.server.ignoreStubClasses=true features ?
> I tried specify it when deploying the server java
> -Djava.rmi.server.ignoreStubClasses=TRUE myServer, without rmic'ing a
> stub in the path. It complain s and still looking for the stub:
> ---------------------------------------------------
> d:\jsrc\RMITT022701Dynaload>java -cp server5
-Djava.rmi.server.ignoreStubClass=TRUE
-Djava.rmi.server.codebase=file:\jsrc\RMITT022701Dynaload\server\
EchoServer
>
> java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is:
>         java.rmi.UnmarshalException: error unmarshalling arguments;
nested exception is:
>         java.lang.ClassNotFoundException: EchoServer_Stub
>         at
sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385)
>         at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
>         at sun.rmi.transport.Transport$1.run(Transport.java:153)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at sun.rmi.transport.Transport.serviceCall(Transport.java:149)

How is the EchoServer instance being exported?  If it is exported by
invoking the static UnicastRemoteObject.exportObject(Remote) method,
then a pre-generated EchoServer_Stub class is still required
(regardless of the java.rmi.server.ignoreStubClass system property
setting); for more information, see:

http://archives.java.sun.com/cgi-bin/wa?A2=ind0501&L=rmi-users&P=556

The fix is to use the UnicastRemoteObject.exportObject(Remote,int)
method instead, passing 0 for the port.

Note that the exception quoted above seems to indicate that an
EchoServer_Stub class was actually found and instantiated in the
remote object's VM; it just couldn't be found during unmarshaling in
the registry's (?) VM.

-- Peter

========================================================================
===
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

===========================================================================
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.