Subject Re: java.io.NotSerializableException
Author Roman Rokytskyy
Hi,

> It happens very hardly ever after compiling changes and reloading
> some JSP beans into Tomcat.
>
> The solution is recompile the same code, without adding any new
> change, and reload it again.

I think keyword here is "reload it again".



> 2003-05-23 13:17:14 StandardManager[/wasp] IOException while loading
> persisted sessions: java.io.WriteAbortedException: writing aborted;
> java.io.NotSerializableException: org.firebirdsql.jdbc.FBConnection
> java.io.WriteAbortedException: writing aborted;
> java.io.NotSerializableException: org.firebirdsql.jdbc.FBConnection

Why do you store connections in http sessions? Do you expect that on
serialization it will close the connection, and after de-serializing
it will restore connection to the database from the point when it
disconnected?

In general, it is a very bad idea to store connection in the session.
In particular, you cannot serialize session, since java.sql.Connection
is not serializable.

Best regards,
Roman Rokytskyy