File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Using enum in remote object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Using enum in remote object" Watch "Using enum in remote object" New topic
Author

Using enum in remote object

Benedikt Burgstaller
Greenhorn

Joined: Jun 25, 2005
Posts: 3
Hello folks,

i do have a class where i use fields of type enum and get a java.io.NotSerializableException.
As all the other fields are of a simple type (int, etc), i don't know, why this class isn't serializeable/remoteable. Maybe the enum is the problem.
The class 'NoteImpl' is transfered between a client and a server using RMI. The class 'Note' is the interface, containing all method definitions, which is required for Java-RMI.

Does anybody know what the problem is?

Thanks in advance
Benedikt

My class:
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38481
    
  23
If you are trying to serialize your class, does it implement java.io.Serializable? It won't serialize otherwise.

CR
Benedikt Burgstaller
Greenhorn

Joined: Jun 25, 2005
Posts: 3
Thanks a lot, works now, didn't think about that the right way. Should have found it myself, looking at it afterwards.

Thanks
Benedikt
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38481
    
  23
Only too glad to help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using enum in remote object