We solved the HttpSession/ClassCastException problem with Tomcat
3.2.1 . The "Usuario" class now implements the Serializable interface. See
the Tomcat source code, SessionSerializer.java, for further references.
Thanks to evryone how helped us ....
bye
jk
> -----Original Message-----
> From: João Robertson Kramer Santana
> Sent: Quinta-feira, 1 de Fevereiro de 2001 15:35
> To: '[EMAIL PROTECTED]''
> Subject: FW: ClassCastException (NullPointerException)
>
> Sorry, instead on ClassCastException read NullPointerException. It
> seams that the new class can´t connect to the previous HttpSession.
> bye
>
>
> -----Original Message-----
> From: João Robertson Kramer Santana
> Sent: Quinta-feira, 1 de Fevereiro de 2001 14:42
> To: '[EMAIL PROTECTED]'
> Subject: ClassCastException
>
> We are using Tomcat 3.2.1 and it is configured with "autoreload"
> because in an developement environment we are always making changes to the
> source code and don´t want to stop/start the Web Server every time a new
> or upgraded servlet is ready to be tested. This has been be the ideal
> developemnt environment for us until we started to have problems wit a
> ClassCastException.
> The problem is that we are using the HttpSession to store
> information about the logged user in a class named "Usuario". There is a
> starting servlet that is resposible for creating the user class
> ("Usuario") and storing it in the HttpSession. The other classes access
> the HttpSession , retreive the user object and make a cast to the class
> named Ususario. This works fine until the moment we need to upgrade a
> class with a new version. This time, when the "upgraded class" retreives
> the user object from the HttpSession and tries to make a cast an
> ClassCastException occurs. This error does not occur with the other
> classes that were not upgraded.
> Are we forgetting something important about the how the servlets
> work ? Is this a limitation or problem in the Tomcat 3.2.1 implemntation ?
> Can someone bring us some ligth on what is going on.
>
> Thanks in advance for the help.
>
> bye
> jk
>
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
FW: ClassCastException (NullPointerException)
Jo�o Robertson Kramer Santana Tue, 06 Feb 2001 08:32:12 -0800
- ClassCastException (NullPointerException) Jo�o Robertson Kramer Santana
- ClassCastException (NullPointerExceptio... Jo�o Robertson Kramer Santana
- ClassCastException (NullPointerExceptio... Tike, Raju
