<div dir="ltr">Hi,all<div><br>In Shibboleth IdP v4.0.0, we defined the following Beans in the configuration file:<br><br>```<br><bean id="shibboleth.HttpServletRequest" class="net.shibboleth.utilities.java.support.net.ThreadLocalHttpServletRequestProxy" /><br><bean id="shibboleth.HttpServletResponse" class="net.shibboleth.utilities.java.support.net.ThreadLocalHttpServletResponseProxy" /><br>```<div><br>Inside our custom Java code that we developed, we used the following line to retrieve the HTTP request and it was working without any issues:<br><br>```<br>HttpServletRequest req = (HttpServletRequest) context.getBean("shibboleth.HttpServletRequest");<br>```</div><div><br>Due to the specification changes in Shibboleth IdP v5.0.0, we defined the following Beans in conf/global.xml:<br><br>```<br><bean id="shibboleth.HttpServletRequest" class="net.shibboleth.shared.servlet.impl.ThreadLocalHttpServletRequestSupplier" /><br><bean id="shibboleth.HttpServletResponse" class="net.shibboleth.shared.servlet.impl.ThreadLocalHttpServletResponseSupplier" /><br>```</div><div><br>Just as with Shibboleth IdP v4, we tried to retrieve the HTTP request using the same code:<br><br>```<br>HttpServletRequest req = (HttpServletRequest) context.getBean("shibboleth.HttpServletRequest");<br>```</div><div><br>However, we encountered the following error:<br><br>```<br>java.lang.ClassCastException: class net.shibboleth.shared.servlet.impl.ThreadLocalHttpServletRequestSupplier cannot be cast to class jakarta.servlet.http.HttpServletRequest (net.shibboleth.shared.servlet.impl.ThreadLocalHttpServletRequestSupplier is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @ba54932; jakarta.servlet.http.HttpServletRequest is in unnamed module of loader 'app')<br>```</div><div><br>Do you have any solutions to this problem?</div></div></div>