Based on the stack trace I would double check index.jsp file - looks
like it has some references to Session. Just to remind you, the
session isn't created anymore if not requested by developer/user, see
https://issues.apache.org/jira/browse/WW-4741

wt., 27 sie 2024 o 20:54 Priti Pithadia <pritip1...@gmail.com> napisał(a):
>
>
> Hi Lukasz,
>
> Subject:  Assistance Required for Struts Upgrade Issue - “Session Already 
> Invalidated”
>
> I am currently upgrading our application from Struts 2.5 to Struts 6.1.2 and 
> from JDK 8 to JDK 11, using Payara Enterprise 5.63.0. The upgrade has been 
> successful overall, except for the “logout” feature. When I click on 
> “logout,” it shows the error “Session Already Invalidated.”
>
> I am encountering an issue with Struts2 where a session attribute is being 
> accessed after the session has been invalidated. Please see the error below:
>
>
> SEVERE:   ERROR ClosingUIBean Could not open template
> SEVERE:   java.lang.IllegalStateException: getAttribute: Session already 
> invalidated
> at 
> org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1325)
> at 
> org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:161)
> at org.apache.struts2.dispatcher.SessionMap.get(SessionMap.java:157)
> at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:879)
> at org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:53)
> at 
> org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:54)
> at org.apache.jsp.index_jsp._jspx_meth_s_form_0(index_jsp.java:382)
> at org.apache.jsp.index_jsp._jspService(index_jsp.java:171)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)
> at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
>
>
> I have reviewed the Struts migration guide but have not been able to find a 
> solution to resolve this error. Could you please guide me or help me to 
> resolve this issue so that no session attributes are accessed after the 
> session is invalidated?
>
> Please see attached document for complete error details.
>
>
> Thanks,
>
> Pritee
>
>
> On Sun, Mar 10, 2024 at 8:46 PM Mahabir Gupta <mahabir...@gmail.com> wrote:
>>
>> Dear Lukasz,
>>
>> I have upgrade my Struts2 to Struts6.3.0.2. However as I am still using
>> local environment to test the application, the Heartbeat Session gets
>> logged out very soon. Is there a way I can change the Heartbeat Session
>> from logging out very quickly. Kindly advise. Thank you.
>>
>> Regards
>> Mahabir

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to