mnabeelkhan / tableexport-for-vaadin

Automatically exported from code.google.com/p/tableexport-for-vaadin
0 stars 0 forks source link

NotSerializableException on DeletingFileInputStream class running under Tomcat. #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use TableExport to generate and download xls file.

What is the expected output? What do you see instead?
System crashes with next output:

SEVERE: IOException while loading persisted sessions: 
java.io.WriteAbortedException: writing aborted; 
java.io.NotSerializableException: 
com.vaadin.addon.tableexport.DeletingFileInputStream
java.io.WriteAbortedException: writing aborted; 
java.io.NotSerializableException: 
com.vaadin.addon.tableexport.DeletingFileInputStream
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
.....

What version of the product are you using? On what operating system?
Table export version: 1.3.0
OS: CentOS 

Please provide any additional information below.
I've fixed problem locally by using my own MyDeletingFileInputStream class with 
signature:

public class MyDeletingFileInputStream extends FileInputStream implements 
Serializable;

Original issue reported on code.google.com by vitaly.r...@gmail.com on 6 Aug 2012 at 2:47

GoogleCodeExporter commented 8 years ago
I'm having the same issue after I switched to memcached serializing of 
sessions. This makes the issue more visible since the sessions are serialized 
after each request as opposed to the standard Tomcat session handling.

I'm also using version 1.3.0.

Original comment by roland.b...@spagettikod.se on 22 Oct 2012 at 7:04

GoogleCodeExporter commented 8 years ago
Adding implements Serializable to a class that extends a non serializable class 
does not magically fix the problem that FileInputStream is not serializable.

I marked the InputStream as transient, so that it will not be serialized. That 
should fix that issue for most cases.

Original comment by daj...@gmail.com on 7 Nov 2014 at 9:41

Attachments: