Uploaded image for project: 'ZZZ-WSO2 Data Services Server'
  1. ZZZ-WSO2 Data Services Server
  2. DS-1201

DELETE resource cannot be invoked when added while batch req is enabled - StringIndexOutOfBoundsException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.5.1-Beta, 3.5.1
    • Component/s: None
    • Labels:
      None
    • Severity:
      Major
    • Estimated Complexity:
      Moderate
    • Test cases added:
      Yes

      Description

      Recreation steps

      1) Have a .dbs with batch req enabled.
      2) Add a delete resource and a query
      3) redeploy
      4) try invoking the resource by a rest client

      You get the following error

      TID: [-1234] [] [2016-06-07 10:14:42,282] ERROR

      {org.apache.catalina.core.StandardWrapperValve} - Servlet.service() for servlet [bridgeservlet] in context with path [/] threw exception {org.apache.catalina.core.StandardWrapperValve}

      java.lang.StringIndexOutOfBoundsException: String index out of range: -51
      at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:872)
      at java.lang.StringBuffer.substring(StringBuffer.java:412)
      at org.apache.axis2.builder.XFormURLEncodedBuilder.extractParametersUsingHttpLocation(XFormURLEncodedBuilder.java:292)
      at org.apache.axis2.builder.XFormURLEncodedBuilder.processDocument(XFormURLEncodedBuilder.java:99)
      at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:188)
      at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:146)
      at org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:116)
      at org.apache.axis2.transport.http.AxisServlet$RestRequestProcessor.processURLRequest(AxisServlet.java:843)
      at org.apache.axis2.transport.http.AxisServlet.doDelete(AxisServlet.java:295)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
      at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
      at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.wso2.carbon.ui.filters.CSRFPreventionFilter.doFilter(CSRFPreventionFilter.java:88)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.wso2.carbon.ui.filters.CRLFPreventionFilter.doFilter(CRLFPreventionFilter.java:59)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)


      Workaround :
      1) disable "enable batch req"
      2) Add the resource and query
      3) redeploy
      4) Enable the "enable batch req"

        Attachments

          Activity

            People

            • Assignee:
              anupama@wso2.com Anupama Pathirage
              Reporter:
              shani@wso2.com Shani Ranasinghe
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: