How to deal with NotSerializableException in Ja

Tutorials Shared by the Internet Community

Advertisements


Synopsis

java.io.NotSerializableException comes when you try to serialize a class, which contains another object in form of member variable, which is not Seria

Statistics

  • Total Hits - 9134

  • Total Votes - 99 votes

  • Vote Up - 43 votes

  • Vote Down - 56 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/JAVA Misc

  • Submitted By - Javin Paul

  • Submitted on - 2013-11-21 08:35:22

Description

java.io.NotSerializableException comes when you try to serialize a class, which contains another object in form of member variable, which is not Serializable. There are two ways to solve this error, either customize serialization process by using Externalizable or just use transient variable to exclude those members during Serialization process. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements