jQuery in Action, 3rd edition
The moose likes Distributed Java and the fly likes Error returning object from Remote method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Error returning object from Remote method" Watch "Error returning object from Remote method" New topic

Error returning object from Remote method

naveen chinthakunta

Joined: Sep 26, 2005
Posts: 16
Hi all,

I am trying to pass a string to a remote method and return an object of a user defined class. In the process i am getting the following error.

Exception in thread "main" java.rmi.RemoteException: call return failed: ; nested exception is:
java.io.WriteAbortedException: Exception thrown during writing of stream; java.io.NotSerializableException: drac.TNAClass


could u tell me where i am going wrong? also is this allowed in RMI? If not, whats the work around?

Thanks in advance.

Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

The message says it all:

Any Class you wish to pass to or from an RMI Server must implement the Serializable interface.

There are many examples of how to do this in the tutorials.

Ed's latest article: A Java Parallel Calamity http://coopsoft.com/ar/Calamity2Article.html
I agree. Here's the link: http://aspose.com/file-tools
subject: Error returning object from Remote method
It's not a secret anymore!