PQ66830: ChainerServlet throws a
ClassCastException
Downloadable files
Abstract
After applying PQ54217 (or Fix Pack 4.0.4) ChainerServlet
fails to handle request with sessions. ChainerServlet throws a
ClassCastException.
Download Description
PROBLEM DESCRIPTION:
ClassCastException is thrown when attempting to retrieve a session object
when request is of type ChainedRequest. After applying PQ54217( or Fix
Pack 4.0.4 ) ChainerServlet throws a ClassCastException when attempting to
participate in sessions.
Stack trace:
[9/18/02 14:42:12:791 MDT] 198e734c WebGroup X Servlet Error:
com.ibm.websphere.servlet.filter.ChainedRequest:
java.lang.ClassCastException:
com.ibm.websphere.servlet.filter.ChainedRequest
at
com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getSRTSessionAPISupport(HttpServletRequestProxy.java:279)
at
com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getSession(HttpServletRequestProxy.java:103)
at
com.ibm.servlet.engine.webapp.HttpServletRequestProxy.getSession(HttpServletRequestProxy.java:107)
at
com.galileo.product.ctp.servlets.GZipServlet.service(GZipServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:678)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:117)
at
com.ibm.websphere.servlet.filter.ServletChain.handleDispatch(ServletChain.java(Compiled
Code))
at
com.ibm.websphere.servlet.filter.ServletChain.forward(ServletChain.java:109)
at
com.ibm.websphere.servlet.filter.ChainerServlet.service(ChainerServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:678)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:117)
at
com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:151)
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled
Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:137)
USERS AFFECTED:
WebSphere® Application Server Developers utilizing session with
ChainerServlet or having mime filtering enabled.
RESOLUTION:
When using mime filtering or WebSphere's ChainerServlet, the
ChainedRequest object is not able to retrieve the session objects. A
ClassCastException is thrown since ChainedRequest did not extend /
implement the WebSphere class HttpServletRequestProxy object used to
retrieve session information. Modified the WebSphere implementation for
retrieving HttpServletRequestProxy to ensure that all requests can be cast
to HttpServletRequestProxy when attempting to retrieve the session
object.
Prerequisites
None
Installation instructions
Please refer to the readme for detailed installation
instructions.