Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    IndexOutOfBoundsException while calling RPCManager.getData()

    Please let us know what are the possible causes of getting the below IndexOutOfBoundsException exception in a call to RPCManager.getData() ?

    Something in our application is causing the below exception in smartclient (RPCManager). As of now everything looks fine with the code, we suspect this could be caused due to data (encoding/decoding)… but not sure.
    Moreover the issue happened few times in production and currently we are unable to replicate it locally.

    java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at com.isomorphic.rpc.RPCManager.getRequest(RPCManager.java:361)
    at com.isomorphic.rpc.RPCManager.getData(RPCManager.java:345)
    at com.ftid.evs.corp.webapp.servlet.RPCHandler.doPost(RPCHandler.java:417)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:248)


    looking into rpcmanager out of curiosity:
    public RPCRequest getRequest()
    {
    int requestCount = requestCount();
    if(requestCount > 1)
    log.warn("getRequest() on multiop RPC (" + requestCount + " requests pending) ", new Exception());
    return (RPCRequest)requests.get(0); <--- IndexOutOfBoundsException
    }

    Thanks

    #2
    Sorry, but we've never seen that before and can't suggest a cause. Even if you attempt:

    Code:
    isc.RPCManager.startQueue();
    isc.RPCManager.sendQueue();
    No request is sent. So you'll have to gather some more information, such as what the request looks like.

    Comment


      #3
      Would like to explain the scenario here...

      As of now, we know that the error is caused by an UI action.
      Basically in the UI, we have a ListGrid with 4 columns. When the user hits Save button we make a RPC call with input as listGrid.getData()

      The call to RPC is similar to this :
      RPCManager.sendRequest({data: listGrid.getData(), callback: "callBack(data)",
      actionURL: "myapp/rpcRequest/saveXX?action=save", showPrompt:true, prompt:"Saving your changes..."});


      'SmartClient Version: 7.0rc4 (built 2010-04-16)',
      Firefox version 3.6.3

      Comment


        #4
        Sorry, this doesn't suggest a cause either. Again we'd recommend trying to capture what the HTTP request looks like that causes this error.

        Comment

        Working...
        X