我想知道 Alfresco 中“Company Home”目录下的所有文件夹名称,但出现错误。
代码 -
ItemIterable<QueryResult> results = session.query("SELECT * FROM cmis:folder where IN_TREE('/Company Home')", false);
try {
for (QueryResult result : results) {
folderId = result.getPropertyValueById(PropertyIds.OBJECT_ID);
Folder folder = (Folder) session.getObject(folderId);
System.out.println("Folder Name " + folder.getName());
}
} catch(Exception e) {
e.printStackTrace();
}
错误 -
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: 00270668 Request failed 500 /solr/alfresco/cmis?wt=json&fl=DBID%2Cscore&rows=100&df=TEXT&start=0&locale=en_US&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:452)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:570)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query(DiscoveryServiceImpl.java:142)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl$3.fetchPage(SessionImpl.java:567)
at org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage(AbstractIterator.java:132)
at org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.hasNext(CollectionIterator.java:48)
at main.java.org.apache.chemistry.opencmis.doc.QueryTest.folderName(QueryTest.java:180)