Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1262

Executing multiple queries in batch request leads to parameters mismatch / not found

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • V2 2.0.10
    • None
    • odata2-jpa
    • None
    • SAP Cloud Platform

    Description

      Hello Olingo community,

      we have an issue when sending multiple queries packed in batch request. Often upon restart of our application (when the caches are empty), the first execution of a particular batch request which contains quite a number of queries we are getting one of the following errors (most of the time the first one): 

       You have attempted to set a value of type class java.lang.String for parameter 5 with expected type of int from query string

      SELECT E1 FROM CreditProduct E1 WHERE (((E1.creditProductPk.creditAgencyId = ?2) AND ((E1.creditProductTypeCode = ?5) OR (E1.creditProductTypeCode = ?8))) AND (E1.isDeactivated = false)).

       Query argument 33 not found in the list of parameters provided during query execution.

       While trying to invoke the method java.lang.String.contains(java.lang.CharSequence) of a null object returned from org.apache.olingo.odata2.jpa.processor.core.ODataParameterizedWhereExpressionUtil.getJPQLStatement()

       Query argument 3 not found in the list of parameters provided during query execution.

      It looks like that the issue could be in class ODataParameterizedWhereExpressionUtil where the parameterizedQueryMap is defined. It is defined as static and it looks like a concurrency issue. Is there a reason behind defining this map as static? It seems very similar to the already opened issue OLINGO-1254

      As soon as the queries runs one time and the caches are filled we don't have it anymore unless the app is restarted.

      Could you please assist us with finding a solution here?

      Thank you,
      Milko

      Attachments

        Activity

          People

            Unassigned Unassigned
            milko.todorov Milko Todorov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: