Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-16063

Error serializing aggregates to JSON

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0-HF02, 7.1
    • Component/s: Automation

      Description

      When invoking the Document.PageProvider operation on a provider with aggregates support (ex: default_search) JsonDocumentListWriter fails to write
      the aggregates.

      For instance:

      curl -u Administrator:Administrator -H 'Content-Type: application/json+nxrequest' -d '{"params":{"providerName":"default_search","namedParameters":{"param":"value"}}}' http://127.0.0.1:8080/nuxeo/site/automation/Document.PageProvider
      

      produces:

      org.codehaus.jackson.map.JsonMappingException: (was java.lang.UnsupportedOperationException) (through reference chain: java.util.HashMap["dc_created_agg"]->org.nuxeo.elasticsearch.aggregate.DateHistogramAggregate["searchDocument"]->org.nuxeo.ecm.core.api.impl.SimpleDocumentModel["id"])
      ....
      at org.codehaus.jackson.JsonGenerator.writeObjectField(JsonGenerator.java:1089)
      at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonDocumentListWriter.writeDocuments(JsonDocumentListWriter.java:194)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: