4 Replies Latest reply on Nov 28, 2011 2:30 AM by Sri Ram

    jboss 4.2.0.GA servlet forward throw exception

    Richard Yang Apprentice

      I am using jboss 4.2.0.GA to run a web application. This application runs fine under jboss 4.0.3SP1 but right after we switched to 4.2.0.GA, it does not run anymore. It is deployed succefully, but I got the following when the RequestDispatcher.forward is called.

      javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
      at org.apache.catalina.core.ApplicationDispatcher.checkSameObjects(ApplicationDispatcher.java:1018)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:329)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at com.ncs.scoring.presentation.servlet.RequestProcessor.processGeneralError(RequestProcessor.java:70)
      at com.ncs.scoring.servlet.HomePage.go(HomePage.java:155)
      at com.ncs.scoring.servlet.RedirectionServlet.doHtmlJoinProject(RedirectionServlet.java:84)
      at com.ncs.scoring.servlet.RedirectionServlet.doGet(RedirectionServlet.java:139)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.pearson.epen.tools.servlet.filter.CacheControlFilter.execute(CacheControlFilter.java:87)
      at com.pearson.epen.tools.servlet.filter.AbstractHttpServletRequestFilter.doFilter(AbstractHttpServletRequestFilter.java:28)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      I don't know what caused this.

      Thanks.

      richard

        • 1. Re: jboss 4.2.0.GA servlet forward throw exception
          stefan lotties Newbie

          Hi,

          I'm facing the same problem:

          2007-08-09 12:10:01,834 [http-0.0.0.0-8080-1] ERROR org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/webadmin].[action] - Servlet.service() for servlet action threw exception
          javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
           at org.apache.catalina.core.ApplicationDispatcher.checkSameObjects(ApplicationDispatcher.java:1018)
           at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:329)
           at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
           at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
           at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:261)
           at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:237)
           at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:300)
           at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
           at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
           at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
           at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:271)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
           at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
           at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
           at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
           at org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage(FormAuthenticator.java:316)
           at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:244)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:595)
          


          it's not reproducable. It just seems to happen when a request with method=HEAD is being received, but I wonder who does the HEAD-request.

          Kind regards


          • 2. Re: jboss 4.2.0.GA servlet forward throw exception
            stefan lotties Newbie

            Hi again,

            I just found out that the requests provoking these exceptions come from the host the jboss runs on, not from the clients surfing in the application.

            Kind regards

            • 3. Re: jboss 4.2.0.GA servlet forward throw exception
              Artak Miletbashyan Newbie

              Hi,
              I get the same exception when using ZK framework in portlet (portal 2.6.1 bundled with AS 4.2.1).
              I got this every time loading the page.
              Can you help me to fix it? I realy need ZK and portal 2.6.1.

              Thanks

              • 4. Re: jboss 4.2.0.GA servlet forward throw exception
                Sri Ram Newbie

                I got the same exception :

                 

                2011-Nov-17 16:02:47 ERROR [[action]] Servlet.service() for servlet action threw exception
                javax.servlet.ServletException: Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
                        at org.apache.catalina.core.ApplicationDispatcher.checkSameObjects(ApplicationDispatcher.java:985)
                        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:316)
                        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
                        at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
                        at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
                        at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
                        at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
                        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
                        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
                        at com.vasoftware.sf.client.struts.SfActionServlet.process(SfActionServlet.java:85)
                        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
                        at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:271)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
                        at com.vasoftware.sf.client.struts.SfActionServlet.service(SfActionServlet.java:53)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                        at com.vasoftware.sf.client.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:175)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
                        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
                        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
                        at java.lang.Thread.run(Thread.java:619)
                

                ]

                 

                 

                This is because of more strict Servlet 2.5 specifications on JBoss (which is default for Tomcat 6+). This can be thrown on JBoss 4.2.0+ GA and can be fixed by adding the following directive to the server startup parameters:

                 

                -Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=false