Java - Google App Engine - InvalidClassException when I change a class that was stored in session sc
        Posted  
        
            by Spines
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Spines
        
        
        
        Published on 2010-04-08T05:18:57Z
        Indexed on 
            2010/04/08
            5:23 UTC
        
        
        Read the original article
        Hit count: 439
        
I updated my User class, and now whenever someone that had the old version of the User class stored in their session scope accesses my site, I get an InvalidClassException.
javax.servlet.ServletException: java.lang.RuntimeException: 
java.io.InvalidClassException: User; local class incompatible: 
stream classdesc serialVersionUID = 4949038118012519093, 
local class serialVersionUID = -971500502189813151
How do I stop this error from happening for those users? I could probably invalidate everyone's sessions every time I want to update a class that gets stored in session scope, but is there a better way, so that my user's don't have to login again?
© Stack Overflow or respective owner