-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Manlio,

On 10/14/2009 12:30 PM, Manlio Malaidini wrote:
> I've come across a problem that I haven't found a clear solution yet
> (despite some extensive time spent on google & books). If you persist
> sessions for example with FileStore, everything is fine & dandy except
> for when you start putting custom objects in the session: when I do
> so, I get a ClassNotFoundException when tomcat tries to deserialize
> the session.

Is this happening in production,or only in development?

I ask because each Class has a serialVersionId which essentially
versions the Class. If you recompile the Class after making changes to
any method signature, member, or even the order of these items, the
version id changes and de-serialization fails.

This often happens when you are working on the FooBean class, which has
ab object stored in the session. You redeploy your webapp after
deploying your new code, and Tomcat fails to re-load the session data
because there is a Class mismatch between the data being loaded from the
session and the Class available to the JVM.

Could this be your problem?

> I think that this happens because the Shared class loader doesn't know
> about the classes in your webapp and in fact I've managed to make it
> work by deploying my classes under $CATALINA_BASE/shared/lib.

I have persistent sessions working just fine in Tomcat 5.5.26 with
custom objects defined only in WEB-INF/classes.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrWAgwACgkQ9CaO5/Lv0PBeugCfWi9lPn+n8SHgALK/e8rfIHMp
DQkAn2pY1+0goRvYB4M1WucS/VI8Kv4W
=3FJZ
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to