File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Error returning object from Remote method

naveen chinthakunta
Greenhorn

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.

navEEn
Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

The message says it all:
java.io.NotSerializableException

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
 
GeeCON Prague 2014
 
subject: Error returning object from Remote method