• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Using enum in remote object

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
Marshal
Posts: 80772
489
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 80772
489
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only too glad to help
 
reply
    Bookmark Topic Watch Topic
  • New Topic