Uploaded image for project: 'Cactus'
  1. Cactus
  2. CACTUS-39

ClassCastException when casting WebAppRequestDispatcher

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 1.4
    • 1.7
    • Framework
    • None
    • Operating System: Windows NT/2K
      Platform: PC
    • 21484

    Description

      I wrote to test class to test a servlet which finally does a forward to a JSP.
      When I call the forward method on the RequestDispatcher, I get the following
      error. It looks like
      org.apache.cactus.server.RequestDispatcherWrapper.dispatch179_forward is trying
      to cast the WebAppRequestDispatcher to something it shouldn't. Here is the
      stack trace ...

      java.lang.ClassCastException:
      com.ibm.servlet.engine.webapp.WebAppDispatcherRequest
      at org.apache.cactus.server.RequestDispatcherWrapper.dispatch179_forward
      (LogAspect.aj(1k):102)
      at org.apache.cactus.server.RequestDispatcherWrapper.around179_forward
      (LogAspect.aj(1k):1149)
      at org.apache.cactus.server.RequestDispatcherWrapper.forward(LogAspect.aj
      (1k):99)
      at org.apache.cactus.server.RequestDispatcherWrapper.dispatch179_forward
      (LogAspect.aj(1k):104)
      at org.apache.cactus.server.RequestDispatcherWrapper.around179_forward
      (LogAspect.aj(1k):1149)
      at org.apache.cactus.server.RequestDispatcherWrapper.forward(LogAspect.aj
      (1k):99)
      at com.vanguard.services.presentation.state.HtmlResponse.createResponse
      (HtmlResponse.java:128)
      at com.vanguard.services.presentation.state.HtmlResponse.createResponse
      (HtmlResponse.java:92)
      at web.corpcontent.vanguardviews.controller.VanViewsController.createResponse
      (VanViewsController.java:260)
      at com.vanguard.services.presentation.Activity.execute(Activity.java:283)
      at com.vanguard.services.presentation.web.WebServlet.doGet(WebServlet.java:126)
      at com.vanguard.TestServlet.TestVanViewsServlet.testGetMethod
      (TestVanViewsServlet.java:61)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:332)
      at org.apache.cactus.AbstractTestCase.runBareServerTest
      (AbstractTestCase.java:235)
      at org.apache.cactus.server.AbstractWebTestCaller.doTest
      (AbstractWebTestCaller.java:149)
      at org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest
      (LogAspect.aj(1k):125)
      at org.apache.cactus.server.AbstractWebTestController.around87_handleRequest
      (LogAspect.aj(1k):1149)
      at org.apache.cactus.server.AbstractWebTestController.handleRequest
      (LogAspect.aj(1k):101)
      at org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost
      (LogAspect.aj(1k):123)
      at org.apache.cactus.server.ServletTestRedirector.around113_doPost(LogAspect.aj
      (1k):1149)
      at org.apache.cactus.server.ServletTestRedirector.doPost(LogAspect.aj(1k):109)
      at org.apache.cactus.server.ServletTestRedirector.dispatch112_doGet
      (LogAspect.aj(1k):96)
      at org.apache.cactus.server.ServletTestRedirector.around112_doGet(LogAspect.aj
      (1k):1149)
      at org.apache.cactus.server.ServletTestRedirector.doGet(LogAspect.aj(1k):92)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      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:721)
      at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch
      (WebAppRequestDispatcher.java:374)
      at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward
      (WebAppRequestDispatcher.java:118)
      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:323)
      at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
      at com.ibm.ws.util.CachedThread.run(ThreadPool.jav

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--HtmlResponse.java
          5 kB
          Krishna Madabhushi
        2. ASF.LICENSE.NOT.GRANTED--VanViewsController.java
          22 kB
          Krishna Madabhushi

        Activity

          People

            vmassol Vincent Massol
            krishna71_98@yahoo.com Krishna Madabhushi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: