olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OLINGO-1277) Olingo Java v2 JPA processor concurrency problems while building a query
Date Fri, 13 Jul 2018 12:36:00 GMT
Nikolay created OLINGO-1277:
-------------------------------

             Summary: Olingo Java v2 JPA processor concurrency problems while building a query
                 Key: OLINGO-1277
                 URL: https://issues.apache.org/jira/browse/OLINGO-1277
             Project: Olingo
          Issue Type: Bug
          Components: odata2-jpa
    Affects Versions: V2 2.0.10
            Reporter: Nikolay
         Attachments: olingo.png

When querying simultaneously several filter queries similar to 

{endpoint}/Logs/$count?$filter=(level%20eq%20%27ERROR%27)%20and%20(timeStamp%20ge%20datetime%272018-07-13T08:15:52%27%20and%20timeStamp%20le%20datetime%272018-07-13T09:15:52%27)

 

some of them fail due to concurrency problems - the query parameters get mixed to different
JPA queries:

org.hibernate.QueryException: Named parameter [1] not set
 at org.hibernate.query.internal.QueryParameterBindingsImpl.verifyParametersBound(QueryParameterBindingsImpl.java:251)
 at org.hibernate.query.internal.AbstractProducedQuery.beforeQuery(AbstractProducedQuery.java:1313)
 at org.hibernate.query.internal.AbstractProducedQuery.list(AbstractProducedQuery.java:1412)
 at org.hibernate.query.Query.getResultList(Query.java:146)
 at org.apache.olingo.odata2.jpa.processor.core.access.data.JPAProcessorImpl.process(JPAProcessorImpl.java:233)

java.lang.IllegalArgumentException: Unknown parameter position: 1
 at org.hibernate.query.internal.QueryParameterBindingsImpl.getBinding(QueryParameterBindingsImpl.java:240)
 at org.hibernate.query.internal.AbstractProducedQuery.setParameter(AbstractProducedQuery.java:503)
 at org.hibernate.query.internal.AbstractProducedQuery.setParameter(AbstractProducedQuery.java:104)
 at org.apache.olingo.odata2.jpa.processor.core.access.data.JPAProcessorImpl.setPositionalParametersToQuery(JPAProcessorImpl.java:207)
 at org.apache.olingo.odata2.jpa.processor.core.access.data.JPAProcessorImpl.process(JPAProcessorImpl.java:232)

 

If the oDataJPAContext in JPAProcessorImpl is volatile, the problem doesn't occur any more.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message