• Post Reply Bookmark Topic Watch Topic
  • New Topic

Could not deserialize session data  RSS feed

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
in my struts application, I allow the user to search my database based on some criteira. The search results are stored using java bean. say student bean.
Once i collected all the student bean i am publishing these student information in JSP page. in the log file i am getting the error saying

Could not deserialize session data.

java.io.NotSerializableException: com.StudentBean

And also when i refreshed my page at this point i am getting ClassCastException
java.lang.ClassCastException


Any idea?
[ July 23, 2006: Message edited by: Parameswaran Thangavel ]
 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Parameswaran:
Could not deserialize session data.

java.io.NotSerializableException: com.StudentBean


Hi Parameswaran,

exception is because StudentBean is not implementing Serializable interface.

Whatever objects you store in session must be serializable.

Naseem
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!