Bug 794050 (JBEPP-1118)

Summary: Portal SessionListener attempts to invalidate session that has already been invalidated
Product: [JBoss] JBoss Enterprise Portal Platform 4 Reporter: Matt Davis <mattd>
Component: PortalAssignee: Thomas Heute <theute>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.3.0.GA_CP5   
Target Milestone: ---   
Target Release: 4.3.0.GA_CP7   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-1118
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-08 09:35:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Matt Davis 2011-08-24 14:43:18 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000007qzcJ&sfdc.override=1
project_key: JBEPP

JBoss Portal's HttpSession listener is calling ClusteredSession.invalidated() during invalidation.  In the sessionDestroyed() in looks like invalidate() is being called again.  Since the session has already been invalidated, the following exception is thrown :

[org.jboss.portal.server.listener.SessionListener] An error occured when trying to invalidate the sessions: null
javax.servlet.ServletException
  at org.jboss.portal.web.command.CommandServlet.include(CommandServlet.java:97)
  at org.jboss.portal.web.command.CommandDispatcher.include(CommandDispatcher.java:50)
  at org.jboss.portal.web.jboss.JBossWebContext.include(JBossWebContext.java:66)
  at org.jboss.portal.web.impl.DefaultServletContainer.include(DefaultServletContainer.java:190)
  at org.jboss.portal.server.listener.SessionListener.sessionDestroyed(SessionListener.java:111)
  at org.jboss.web.tomcat.service.session.ClusteredSession.expire(ClusteredSession.java:854)
  at org.jboss.web.tomcat.service.session.JBossCacheManager.clearSessions(JBossCacheManager.java:579)
  at org.jboss.web.tomcat.service.session.JBossCacheManager.stop(JBossCacheManager.java:535)
  at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4477)
  at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1055)
  at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1055)
  at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
  at org.apache.catalina.core.StandardService.stop(StandardService.java:576)
  at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
  at org.apache.catalina.startup.Catalina.stop(Catalina.java:616)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
  at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.web.tomcat.service.JBossWeb.stopService(JBossWeb.java:549)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStop(ServiceMBeanSupport.java:315)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:247)
  at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
  at org.jboss.deployment.SubDeployerInterceptor.invokeNext(SubDeployerInterceptor.java:124)
  at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:109)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at $Proxy0.stop(Unknown Source)
  at org.jboss.system.ServiceController.stop(ServiceController.java:508)
  at org.jboss.system.ServiceController.stop(ServiceController.java:499)
  at sun.reflect.GeneratedMethodAccessor1777.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy4.stop(Unknown Source)
  at org.jboss.deployment.SARDeployer.stop(SARDeployer.java:336)
  at org.jboss.deployment.MainDeployer.stop(MainDeployer.java:667)
  at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
  at org.jboss.deployment.MainDeployer.shutdown(MainDeployer.java:516)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.server.ServerImpl$ShutdownHook.shutdownDeployments(ServerImpl.java:1058)
  at org.jboss.system.server.ServerImpl$ShutdownHook.shutdown(ServerImpl.java:1033)
  at org.jboss.system.server.ServerImpl$ShutdownHook.run(ServerImpl.java:996)
 Caused by: java.lang.IllegalStateException: invalidate: Session already invalidated
  at org.jboss.web.tomcat.service.session.ClusteredSession.invalidate(ClusteredSession.java:710)
  at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
  at org.jboss.portal.server.aspects.server.SignOutInterceptor$Invalidation.doCallback(SignOutInterceptor.java:192)
  at org.jboss.portal.web.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:74)
  at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.jboss.portal.web.command.CommandServlet.doGet(CommandServlet.java:130)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
  at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
  at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:505)
  at org.jboss.portal.web.command.CommandServlet.include(CommandServlet.java:79)
  ... 71 more

Comment 1 Thomas Heute 2011-09-08 09:35:23 UTC
Release Notes Docs Status: Added: Not Yet Documented


Comment 2 Jared MORGAN 2012-01-24 00:04:08 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue
Release Notes Text: Added: A bug in the HttpSession listener caused the ClusteredSession.invalidated() method to be called one during session validation, and again during the sessionDestroyed() call.  Because the session was already invalidated, an exception is raised at the second invalidation attempt. The fix to HttpSession removes the unnecessary second call, which fixes the issue.