2 Replies Latest reply on Dec 6, 2005 1:45 PM by Paul

    Once a request handler returns false all other subsequent re

    Paul Newbie

      Env - Tested on JBoss4.0.2 and 4.0.3RC1

      It appears that if my handler returns false, then all subsequent calls to the endpoint fail with index out of bounds issues. When the request handler first returns false I get the following in the log :

      14:36:24,203 WARN [InvokerProviderJSE] FIXME: handlerChain.handleRequest() returned false

      Subsequent calls then fail in the response call with :

      14:36:33,953 ERROR [HandlerChainBaseImpl] RuntimeException in response handler
      java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
      at java.util.ArrayList.RangeCheck(ArrayList.java:547)
      at java.util.ArrayList.get(ArrayList.java:322)
      at org.jboss.webservice.handler.HandlerChainBaseImpl.handleResponse(HandlerChainBaseImpl.java:277)
      at org.jboss.webservice.handler.ServerHandlerChain.handleResponse(ServerHandlerChain.java:83)
      at org.jboss.webservice.server.InvokerProviderJSE.invokeTarget(InvokerProviderJSE.java:117)
      at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:121)
      at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
      at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
      at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
      at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
      at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)

      at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:200)
      at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:89)

      at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:905)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      14:36:33,953 ERROR [InvokerProviderJSE] Error processing response handler chain
      java.lang.IndexOutOfBoundsException: Index: 1, Size: 1


      To simplify the test I wrote a handler that extends Generic Handler as follows :

      static int count=0;
      
       /**
       * (non-Javadoc)
       *
       * @see javax.xml.rpc.handler.GenericHandler#handleRequest(javax.xml.rpc.handler.MessageContext)
       */
       public boolean handleRequest(MessageContext msgCtx)
       {
       count++;
      
       if (count==2)
       return false;
       else
       return true;
       }
      
       public boolean handleResponse(MessageContext msgCtx)
       {
       return true;
       }
      
      


      The first call works, second fails, and then any further calls fail with the above stack trace.


      Many thanks in advance for any pointers.

      Cheers,
      Paul.