• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using enum in remote object

 
Benedikt Burgstaller
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49813
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are trying to serialize your class, does it implement java.io.Serializable? It won't serialize otherwise.

CR
 
Benedikt Burgstaller
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49813
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only too glad to help
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic