Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004179 [Resin] minor always 08-16-10 08:47 01-18-11 10:22
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution duplicate  
Status closed   Product Version 4.0.9
Summary 0004179: session deserialization to HashMap
Description (rep by Matthew Serrano)

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).

Also, this seems to happen on resin 4.0.9 as well.
Additional Information
Attached Files

- Relationships

- Notes
(0004721)
ferg
08-16-10 12:11

I figured out how to replicate my issue:

If I log in to my application, deploy a war file to webapps, and then refresh my page at the same time the app is automatically reloading, I can cause the error. This is fairly difficult to do consistently but given a few tries I can make it happen. I changed my dependency-check internal to 30 seconds (instead of default 2s) and it was more difficult to replicate because I would refresh my page before the server automatically redeployed which would then trigger the redeployment and everything would work properly. It only seems to happen if you magically access the session as resin is reloading but given that I am able to replicate it pretty easily it seems like something that will definitely happen if we use autodeploy.

Is there a recommendation or guideline not to use autodeploy in production? If not, perhaps there is a bug here that needs to be addressed?
 
(0004953)
ferg
01-18-11 10:22

0004254
 

- Issue History
Date Modified Username Field Change
08-16-10 08:47 ferg New Issue
08-16-10 12:11 ferg Note Added: 0004721
10-08-10 08:43 jnovak Issue Monitored: jnovak
01-18-11 10:22 ferg Note Added: 0004953
01-18-11 10:22 ferg Assigned To  => ferg
01-18-11 10:22 ferg Status new => closed
01-18-11 10:22 ferg Resolution open => duplicate
01-18-11 10:22 ferg Fixed in Version  => 4.0.12


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
33 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker