All references in a Session MUST be serializable if the session is to be stored or replicated. ServletContext can NOT be serializable since it is heavily involved with the details of a given
servlet engine.
I bet that if you dig into the stack trace from the exception you will find some useful information to isolate where the problem originates.
Bill