tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: Tomcat 4.1.24 Session Persistance between restarts ???
Date Sat, 29 Nov 2003 02:22:19 GMT

Make sure all the objects in your session are serializable.  If not, you 
will get null values (or possibly other errors) after deserialization.


At 04:34 PM 11/28/2003 -0800, you wrote:
>    Here is the scenario....
>1) User logs in and begins a session along with loading some session 
>objects (worker classes)
>2) Tomcat is shut down and restarted
>3)  Same user clicks next "button" on current JSP page (user did not know 
>tomcat was restarted)
>      a) Session isNew() reports "false" so code thinks all is well to 
> continue..
>          (Session was  persisted.)
>      b) But stored objects in session are not available (null)
>           NullPointerException thrown when accessing an object that 
> "should" be there if the entire session was persisted for that user.
>A) I found the following post to turn off the default "persistance of the 
>                <!-- Change the manager to PersistentManager to
>                                prevent caching of session data -->
>                <Manager
>                        debug="0"
>                        saveOnRestart="false">  <!-- THIS IS THE IMPORTANT 
> PART -->
>                        <Store 
> className="org.apache.catalina.session.FileStore"/>
>                </Manager>
>   Is that still the accepted technique..???
>B) Not loose the stored session objects between restarts, so as to avoid 
>the NullPointerException.. I don't mind that the session is persisted, but 
>the entire session must be persisted and that seems to NOT be the case.
>     Is that possible????
>     Does that require further "configuration"?
>I have search for this last info, but so far have not looked under the 
>right rock..
>Slap up the side of the head appreciated..<G> (be gentle..)
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message