File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes java.io.NotSerializable Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "java.io.NotSerializable Exception" Watch "java.io.NotSerializable Exception" New topic
Author

java.io.NotSerializable Exception

Ramesh kangamuthu
Ranch Hand

Joined: Mar 13, 2007
Posts: 79
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

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
Ramesh kangamuthu
Ranch Hand

Joined: Mar 13, 2007
Posts: 79
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.io.NotSerializable Exception