we have our Oracle Web Commerce application upgraded to JBoss 7.2.5 EAP and we noticed that for the very first request we get
2020-02-12 11:36:35,867 ERROR [io.undertow.request] (ajp task-1) UT005023: Exception handling request to /: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.RuntimeException: org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.IllegalStateException: WFLYCLWEBUT0002: Session 57_Q1ZxooUX07ReWe1L0DCrmOOW89I6NhDmPKlJZ already exists
while after that application works fine. Luckily we were able to isolate the issue to a quite simple EAR project where we have 3 web applications - the root one on '/' context which serves as a composer and two others that deliver content which means that the first application uses
<tr> <c:import url="/sub1-index.jsp" context="/subapp1"/> </tr> <tr> <c:import url="/sub2-index.jsp" context="/subapp2"/> </tr>
to do that. The jboss-all.xml for our application configures the sharing of sessions among wars inside ear but we do not declare our web applications as <distributable />. From the stacktrace we noticed that we do use, unintentionally, DistributableSessionManager but we were unable to switch to in-memory one so far even though we tried to remove several modules concerning clustering and/or infinispan. As a test we disabled session sharing and it helped but it is not a solution for us.
I've attached the stacktrace, instance configuration file and the example application. Any help would be appreciated.
P.S. We had a similar problem on JBoss 7.0.9 where for the very first request all applications (the main and two sub-applications), despite configured sharing, created different sessions - that is why the examples show some information concerning sessions.