New audit search API queryLogs#AuditQueryBuilder, introduced in 9.3, and now used everywhere on Nuxeo, has regressions.
While browsing on a specific version on WebUI, we've got this exception:
Caused by: UncategorizedExecutionException[Failed execution]; nested: IOException[can not write type [class java.time.ZonedDateTime]];
at org.elasticsearch.action.support.AdapterActionFuture.rethrowExecutionException(AdapterActionFuture.java:89)
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:47)
at org.nuxeo.elasticsearch.client.ESTransportClient.search(ESTransportClient.java:201)
at org.nuxeo.elasticsearch.audit.ESAuditBackend.runRequest(ESAuditBackend.java:671)
at org.nuxeo.elasticsearch.audit.ESAuditBackend.queryLogs(ESAuditBackend.java:272)
at org.nuxeo.ecm.platform.audit.api.document.DocumentAuditHelper.getAuditParamsForUUID(DocumentAuditHelper.java:110)
at org.nuxeo.elasticsearch.audit.pageprovider.ESDocumentHistoryPageProvider.getParameters(ESDocumentHistoryPageProvider.java:117)
at org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider.buildAuditQuery(ESAuditPageProvider.java:187)
at org.nuxeo.elasticsearch.audit.pageprovider.ESAuditPageProvider.getCurrentPage(ESAuditPageProvider.java:101)
at org.nuxeo.ecm.restapi.server.jaxrs.enrichers.AuditJsonEnricher.write(AuditJsonEnricher.java:76)
at org.nuxeo.ecm.restapi.server.jaxrs.enrichers.AuditJsonEnricher.write(AuditJsonEnricher.java:48)
at org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher.write(AbstractJsonEnricher.java:54)
at org.nuxeo.ecm.core.io.marshallers.json.enrichers.AbstractJsonEnricher.write(AbstractJsonEnricher.java:37)
at org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter.write(AbstractJsonWriter.java:76)
at org.nuxeo.ecm.core.io.marshallers.json.ExtensibleEntityJsonWriter.write(ExtensibleEntityJsonWriter.java:99)
at org.nuxeo.ecm.core.io.marshallers.json.AbstractJsonWriter.write(AbstractJsonWriter.java:76)
at org.nuxeo.ecm.webengine.jaxrs.coreiodelegate.PartialCoreIODelegate.writeTo(PartialCoreIODelegate.java:119)
AuditQueryBuilder API converts all kind of date (Date, Calendar, Temporal) to a joda DateTime in order to hold it. Latter we'll get this value as a ZonedDateTime.
When audit backend is Elasticsearch, we've got an exception because the date is not handled by Elasticsearch client. It also could the case for other backends.
Fix the issue on all available backends.
- duplicates
-
NXP-24277 Audit adapter only accepts date filter of format yyyy-MM-dd which causes time zone issue
- Resolved