FishEye REST API "queryAsRows" stopped working

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 4.4.0, 4.3.2
    • Affects Version/s: 4.3.0, 4.3.1
    • Component/s: None
    • Severity 3 - Minor

      Problem

      REST endpoint fails when the query returns a date:

      https://host:port/rest-service-fe/search-v1/queryAsRows/<repo>?query=select%20revisions%20order%20by%20date%20desc%20return%20date,%20author%20limit%2010
      
      javax.xml.bind.MarshalException - with linked exception: [com.sun.istack.SAXException2: class java.time.Instant nor any of its super class is known to this context. javax.xml.bind.JAXBException: class java.time.Instant nor any of its super class is known to this context.]
      

      Same problem when using JSON marshaller (via HTTP headers or URL), e.g.:

      https://host:port/rest-service-fe/search-v1/queryAsRows/<repo>.json?query=select%20revisions%20order%20by%20date%20desc%20return%20date,%20author%20limit%2010
      
      Your request was unable to be processed
      org.codehaus.jackson.map.JsonMappingException - No serializer found for class java.time.Instant and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: com.atlassian.fecrurestplugin.fisheye.RestTabularQueryResultData["row"]->java.util.ArrayList[0]->com.atlassian.fecrurestplugin.fisheye.RestTabularQueryResultRow["item"]->java.util.ArrayList[0])
      

      Workaround

      Use EyeQL CSV export:

      https://host:port/search/<repo>?csv=true&ql=select%20revisions%20order%20by%20date%20desc%20return%20date,%20author%20limit%2010
      

      or remote "date" column from the return clause of EyeQL query.

            Assignee:
            Grzegorz Lewandowski
            Reporter:
            Vitalii Petrychuk
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: