Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.io.NotSerializable Exception

 
Ramesh kangamuthu
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my Struts2 project I got the exception as

SEVERE IOException.
while loading persisted sessions,
java.io.WriteAbortedException,writing aborted.
java.io.NotSerializable Exception
org.apache.struts2.dispatcher.StrutsRequestWrapper.

Can anyone tell me the reason and solution?

Regards,
Ramesh Kangamuthu
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This error could occur if any object you place in Session scope does not implement the Serializable interface. An application server can serialize session objects to conserve resources. Check to see that any and all objects you place in Session scope implement the Serializable interface.
 
Ramesh kangamuthu
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Merill,

I stored String and ArrayList Object to the session. They implement Serializable interface by default. But My application shows continuously shows
NotSerializableException. How can I rectify the error?

Regards,

Ramesh Kangamuthu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic