tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: NotSerializableException MemoryUser?
Date Fri, 03 Jul 2009 14:48:26 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ronald,

On 7/3/2009 6:34 AM, Ronald Klop wrote:
> I'm running Tomcat 6.0.20 in a cluster on 3 nodes. If I restart one I
> get this exception:
> 
> 
> Caused by: java.io.NotSerializableException:
> org.apache.catalina.users.MemoryUser

That's an easy one: MemoryUser does not implement Serializable.

>   <!-- Used by Manager webapp -->
>   <Resource name="UserDatabase" auth="Container"
>             type="org.apache.catalina.UserDatabase"
>      description="User database that can be updated and saved"
>          factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>         pathname="conf/tomcat-users.xml" />

This is likely to be the problem: the manager app is trying to share its
users across the cluster. Uh... don't do that. Either undeploy the
manager app or use a different <Realm> that doesn't use that type of
User object. Or, write your own factory that returns serializable objects.

> What can I do to make the MemoryUser  serializable and why is it trying
> to sync it with other nodes?

It's probably trying to sync the session with other nodes, and this
object is stored in the session. The rest of the stack trace would
probably indicate that the cluster is trying to replicate sessions (or
just this object, as it is being inserted into the session) or something
like that.

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

iEUEARECAAYFAkpOGjoACgkQ9CaO5/Lv0PAKfgCVGPJmrP+xs5Aypo60NEU8uk2y
TwCfTuaeseQX6b4g3qJNFCU85oezZGU=
=iNCj
-----END PGP SIGNATURE-----

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


Mime
View raw message