Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-510

NPE when doing 'order by' in query for inMemory server

    XMLWordPrintableJSON

Details

    Description

      perform this query:
      SELECT t.cmis:name, t.cmis:createdBy, t.cmis:creationDate, t.cmis:lastModifiedBy, t.cmis:lastModificationDate,
      t.cmis:contentStreamMimeType, t.cmis:contentStreamLength, t.cmis:objectId, t.cmis:objectTypeId
      FROM cmis:document t WHERE ((t.cmis:name LIKE 'My%')) ORDER BY t.cmis:name ASC

      ...
      Caused by: java.lang.NullPointerException
      at org.apache.chemistry.opencmis.inmemory.query.InMemoryQueryProcessor$1
      ResultComparator.compare(InMemoryQueryProcessor.java:186)
      at org.apache.chemistry.opencmis.inmemory.query.InMemoryQueryProcessor$1
      ResultComparator.compare(InMemoryQueryProcessor.java:176)
      at java.util.Arrays.mergeSort(Arrays.java:2874)
      at java.util.Arrays.mergeSort(Arrays.java:2886)
      at java.util.Arrays.mergeSort(Arrays.java:2886)
      at java.util.Arrays.sort(Arrays.java:3251)
      at java.util.Arrays.sort(Arrays.java:3269)
      at java.util.Collections.sort(Collections.java:1961)

      Remove the order by clause and the select works.

      SELECT t.cmis:name, t.cmis:createdBy, t.cmis:creationDate, t.cmis:lastModifiedBy, t.cmis:lastModificationDate,
      t.cmis:contentStreamMimeType, t.cmis:contentStreamLength, t.cmis:objectId, t.cmis:objectTypeId
      FROM cmis:document t WHERE ((t.cmis:name LIKE 'My%'))

      Attachments

        Activity

          People

            jenshuebel Jens Hübel
            jay.brown jay brown
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: