-
Type: Bug
-
Status: Resolved
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: 10.10, 2021
-
Fix Version/s: 10.10-HF71, 2023.0, 2021.33
-
Component/s: Automation, Rest API
-
Release Notes Summary:NXQL page provider now works when org.nuxeo.web.ui.pageprovider.method is set to POST
-
Tags:
-
Backlog priority:800
-
Sprint:nxplatform #80
-
Story Points:5
When running a request like the following
curl --location --request POST 'http://localhost:8080/nuxeo/api/v1/automation/Repository.PageProvider' \ -H 'Content-type: application/json' \ -d '{"params": { "providerName": "nxql_search", "pageSize": 40, "queryParams": "SELECT * FROM Document WHERE dc:contributors IN (\"Administrator\", \"npeacock\")"}}' \ -u Administrator:Administrator
with this configuration
<extension target="org.nuxeo.runtime.ConfigurationService" point="configuration"> <property name="org.nuxeo.web.ui.pageprovider.method">POST</property> </extension>
the following error is seen
Failed to invoke operation Repository.PageProvider with aliases [Document.PageProvider]
.
.
.
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 2
at org.nuxeo.ecm.platform.query.nxql.NXQLQueryBuilder.getQuery(NXQLQueryBuilder.java:283) ~[nuxeo-platform-query-api-10.10-HF52.jar:?]
at org.nuxeo.ecm.platform.query.nxql.CoreQueryDocumentPageProvider.buildQuery(CoreQueryDocumentPageProvider.java:235) ~[nuxeo-platform-query-api-10.10-HF52.jar:?]
at org.nuxeo.ecm.platform.query.nxql.CoreQueryDocumentPageProvider.getCurrentPage(CoreQueryDocumentPageProvider.java:117) ~[nuxeo-platform-query-api-10.10-HF52.jar:?]
at org.nuxeo.ecm.automation.core.util.PaginablePageProvider.<init>(PaginablePageProvider.java:43) ~[nuxeo-core-io-10.10-HF66.jar:?]
at org.nuxeo.ecm.automation.jaxrs.io.documents.PaginableDocumentModelListImpl.<init>(PaginableDocumentModelListImpl.java:49) ~[nuxeo-core-io-10.10-HF66.jar:?]
at org.nuxeo.ecm.automation.core.operations.services.DocumentPageProviderOperation.run(DocumentPageProviderOperation.java:154) ~[nuxeo-automation-features-10.10-HF57.jar:?]
The code has an issue with the comma in the IN clause
If you're looking for the generic fix, please follow NXP-32067
- is cloned by
-
NXP-32067 Issue when using Repository.PageProvider with IN clause
- Resolved