This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 38047
    
  22
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: 38047
    
  22
Only too glad to help
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using enum in remote object
 
Similar Threads
Block Sliding Puzzle
Out of Memory when testing a BMP Bean
TableRenderer with multiple lines of text
How do I declare an arrayList and initilise it in a constructor Method
Help !!!! StringIndexOut.....