Matthew Serrano wrote:
> I am running resin 4.0.7 and I store a user object in the session using 
> "User_Bean" as a key. Everything works fine most of the time but it seems 
> when my session expires and I have not logged out, every subsequent call to 
> get this object returns some HashMap instead of my object or null. Since I am 
> casting the object when I retrieve it from the session the message I get is:
>
> java.lang.ClassCastException: java.util.HashMap cannot be cast to 
> com.ordinate.ppass.beans.UserBean
>
> Is there some reason why getting an object from the session would return a 
> Map instead of the object? Is "User_Bean" some reserved word or something? 
> The only way I have been able to get my application working again is to 
> shutdown the server, delete everything in the resin-data folder and restart 
> (deleting the exploded war, deploying the app again, restarting all do not 
> work).
>   
Is the session get/put in the normal request context? As opposed to 
being read from some other thread or a different context class loader?

That behavior sounds like it might be caused by a getAttribute call from 
outside the web-app's context. In other words, if Resin can't find the 
UserBean class when its deserializing. Is that at all possible in your 
application?

-- Scott
> Also, this seems to happen on resin 4.0.9 as well.
>
> thanks
> matt
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>
>   



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to