NPE when doing 'order by' in query for inMemory server
------------------------------------------------------
Key: CMIS-510
URL: https://issues.apache.org/jira/browse/CMIS-510
Project: Chemistry
Issue Type: Bug
Components: opencmis-server-inmemory
Affects Versions: OpenCMIS 0.6.0
Reporter: jay brown
Fix For: OpenCMIS 0.6.0
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%'))
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira