10-21-2021 09:07 AM
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
10-21-2021 09:41 AM
What is the value of nodeGUID?
It should be something without "workspace://spaceStore/" prefix. In CMIS only the ID is used.
10-21-2021 09:45 AM
Is something like this : 2059b02c-3275-11ec-8d3d-0242ac130003.
10-21-2021 09:59 AM
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?
10-21-2021 10:42 AM
Yes, I'm sure it is.
Explore our Alfresco products with the links below. Use labels to filter content by product module.