cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS Query Folder error

francesco_forna
Confirmed Champ
Confirmed Champ
Dear All,
I use Alfresco CE 3.4.d and I wrote a simple CMIS query:

select cmisSmiley SurprisedbjectId from cmis:folder where cmis:name = 'SITENAME'

to find folders (sites) which are stored in the root site repository folder.

The java code should be correct and the site is PRESENT in the repository Sites. But the CMIS query doesn't found anything.

Query query = new Query();
query.setRepositoryId(getRepositoryId());
query.setStatement("select cmisSmiley SurprisedbjectId from cmis:folder where cmis:name = '" + nameSite + "' ");
QueryResponse response = getDiscoveryService().query(query);

The CMIS query was executed by using ADMIN permissions.

Do you have any ideas about this issue?

Thank you.
Francesco.
2 REPLIES 2

fmui
Champ in-the-making
Champ in-the-making
Hi Francesco,

Does your site show up when you run the query "select * from st:site" ?


- Florian

francesco_forna
Confirmed Champ
Confirmed Champ
Dear Florian,
thanks for your reply.

We have tried by using your suggestion but any result has been found.

In Alfresco repository we have, for example, two sites: site 03811 and site 03813.

For example, we have invoked Alfresco services (https protocol):

https://..../alfresco/service/cmis/query?q=SELECT cmisSmiley SurprisedbjectId FROM st:site WHERE cmis:name='03811'

The site 03811 was found.

https://..../alfresco/service/cmis/query?q=SELECT cmisSmiley SurprisedbjectId FROM st:site WHERE cmis:name='03813'

The site 03813 wasn't found.

It's really strange.

Moreover, we have tried by using the WHERE condition with the LIKE, but the site 03813 wasn't found.

By using the Alfresco CMIS browser, the 03813 folder has type st:site.

Any ideas?

Francesco.