Search code examples
javaserializationglassfishejbtransient

Transient field causing serializeable error


I have a class that has marked two fields serilizeable

@Transient
private List<Edge> edges;

@Transient
private List<Cell> cells;

and this works when I get instances of this from the server to my application. Which is an application client. When I try to save an instance of this class back to the server I get serilisation error.

WARNING: 00100006: Class pojo.Cell is not Serializable
at beans._MazeBeanRemote_Wrapper.saveMaze(beans/_MazeBeanRemote_Wrapper.java)

Can someone tell me why I get this error and how I can fix it?


Solution

  • It seems like your annotations are not working.

    Try to make your fields simply private transient.