tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Tomcat Going down Frequently
Date Tue, 16 Nov 2010 21:15:32 GMT
Hash: SHA1


On 11/16/2010 1:21 PM, André Warnier wrote:
> WARNING: Exception processing manager
> org.apache.catalina.session.StandardManager@a20981 background process
> java.lang.IllegalStateException: getAttributeNames: Session already
> invalidated
>         at
> org.apache.catalina.session.StandardSession.getAttributeNames(
>         at
> org.apache.catalina.session.StandardSessionFacade.getAttributeNames(
>         at
>         at

Just to add a bit more for reference:

>         at org.apache.catalina.session.StandardSession.removeAttributeInternal(
>         at org.apache.catalina.session.StandardSession.expire(
>         at org.apache.catalina.session.StandardSession.isValid(
>         at org.apache.catalina.session.ManagerBase.processExpires(

It looks like LoginBean implements HttpSessionBindingListener and it's
being triggered during the expiration of the session.

I actually don't see any reason why this code should cause an exception:

1. The valueUnbound method must be called after the value is
inaccessible via HttpSession.getAttribute
2. There is no way for a client to check the validity of an HttpSession
object before calling getAttribute (or setAttribute for that matter)

The HttpSession interface javadoc says "For session that are invalidated
or expire, notifications are sent after the session has been invalidated
or expired." which means that, at least, the state above is correct.

> The above is a WARNING message, indicating that Tomcat has caught
> something unusual.

The important point there is that it is a WARNING. So, 3 things:

1. This is an exception, not some fatal condition
2. This exception is being caught a logged, so you shouldn't worry too much
3. This is logged as a WARNING, so you shouldn't worry too much

Now, if this exception is actually causing the container to shut itself
down, then it's a serious problem. Here's how you can check:

1. Start Tomcat normally
2. Log into your webapp
3. Log out of your webapp (this should trigger LoginBean.valueUnbound)
4. See if Tomcat shuts down

If Tomcat stays running, then you're okay so far. Now:

1. Change the session timeout from whatever it is (default=30 minutes)
   to 1 minute
2. Start Tomcat normally
3. Log into your webapp
4. Wait 2 minutes (use a stopwatch)
5. Try to do something with your webapp

If Tomcat stays running, then this exception is just a warning and your
stability problems lie elsewhere.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message