Hi,
I'm trying to execute a cmis query through the CMISQueryService using SearchParameters and I'm having the following error :
SearchParameters searchParameters = new SearchParameters();
StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
searchParameters.addStore(storeRef);
searchParameters.setLanguage(SearchService.LANGUAGE_CMIS_ALFRESCO);
searchParameters.setQuery("SELECT * FROM cmis:document WHERE IN_FOLDER('" + nodeGUID + "')");
ResultSet result = icmisQueryService.getResults(searchParameters);
But I'm getting the error below :
WARN [mvc.support.DefaultHandlerExceptionResolver] [http-nio-8080-exec-7] Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: (was java.lang.UnsupportedOperationException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.UnsupportedOperationException) (through reference chain: org.alfresco.repo.search.impl.lucene.PagingLuceneResultSet["wrapped"]->org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSet["resultSetMetaData"]->org.alfresco.repo.search.SimpleResultSetMetaData["columns"])]
Any ideas?
Thank you,
Francisco Duarte
What is the value of nodeGUID?
It should be something without "workspace://spaceStore/" prefix. In CMIS only the ID is used.
Is something like this : 2059b02c-3275-11ec-8d3d-0242ac130003.
This is working fine for me...
SELECT * FROM cmis:document WHERE IN_FOLDER('dfb8291f-56b9-4843-8d55-7364ad628b3c')
May you verify that node is a Folder?
Yes, I'm sure it is.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.