Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005919 [Resin] minor always 06-18-15 08:43 07-27-15 10:24
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.45 Product Version 4.0.40
  Product Build
Summary 0005919: session.getAttribute not allowed in sessionDestroy
Description (rep by Shinomiya Nobuaki)
I'm using Resin 4.0.40.

The following exception has occurred.
{{{
 java.lang.IllegalStateException: SessionImpl[aaacdIdZjcZxjgqRTWu3u,/xxxt]: can't call getAttribute() when session is no longer valid.
       at com.caucho.server.session.SessionImpl.getAttribute(SessionImpl.java:351)
 (2) at xxxr.RemoveLoginSessionListener.sessionDestroyed(RemoveLoginSessionListener.java:37)
       at com.caucho.server.session.SessionImpl.notifyDestroy(SessionImpl.java:1148)
       at com.caucho.server.session.SessionImpl.removeEvent(SessionImpl.java:1125)
       at com.caucho.util.LruCache.remove(LruCache.java:621)
       at com.caucho.server.session.SessionManager.removeSession(SessionManager.java:1725)
       at com.caucho.server.session.SessionImpl.invalidate(SessionImpl.java:1221)
       at com.caucho.server.session.SessionImpl.invalidate(SessionImpl.java:1068)
 (1) at xxx.util.HttpSessionRefresh.execute(HttpSessionRefresh.java:89)
       .
       .
       .
}}}

It becomes following of source when I simplify (1) and (2).

(1)
{{{
 public class HttpSessionRefresh {
     .
     .
     .
     public static HttpSession execute(final HttpServletRequest request) {
         HttpSession session = request.getSession(false);
         if(session != null){
             session.invalidate(); // <---- (A)
         }
         .
         .
         .
}}}

(2)
{{{
 public class RemoveLoginSessionListener implements HttpSessionListener {
     .
     .
     .
     public void sessionDestroyed(final HttpSessionEvent event) {
         final HttpSession session = event.getSession(); // <---- (B)
         .
         .
         .
}}}

Steps To Reproduce
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
06-18-15 08:43 ferg New Issue
07-27-15 10:24 ferg Assigned To  => ferg
07-27-15 10:24 ferg Status new => closed
07-27-15 10:24 ferg Resolution open => fixed
07-27-15 10:24 ferg Fixed in Version  => 4.0.45


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