cancel
Showing results for 
Search instead for 
Did you mean: 

Select cmis error

allamchz
Champ in-the-making
Champ in-the-making
I have the source code:


public List getAlfrescoDocuments() {
        List documents = new ArrayList();
        String myType = "cmis:document";
        Session session = getAlfrecoSession();
        // get the query name of cmis:objectId
        ObjectType type = session.getTypeDefinition(myType);
        PropertyDefinition<?> objectIdPropDef = type.getPropertyDefinitions().get(PropertyIds.OBJECT_ID);
        String objectIdQueryName = objectIdPropDef.getQueryName();
        String queryString ="select d.cmis:objectId from cmis:document as d join p:custom:DocumentSigesa as o on d.cmis:objectId = o.cmis:objectId";
        System.out.println(queryString);

        // execute query
      
        ItemIterable<QueryResult> results = session.query(queryString, false);


        for (QueryResult qResult : results) {
            String objectId = qResult.getPropertyValueByQueryName(objectIdQueryName);
            Document doc = (Document) session.getObject(session.createObjectId(objectId));
            documents.add(doc);
            System.out.println("Entra");
          
        }
        return documents;
    }




But, i get the error:


Exception in thread "main" org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: 04248255 Request failed 500 /solr/alfresco/cmis?wt=json&amp;fl=DBID%2Cscore&amp;rows=100&amp;df=TEXT&amp;start=0&amp;locale=en_US&amp;fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&amp;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 cr.ac.una.cmis.AlfresoService.getAlfrescoDocuments(AlfresoService.java:132)
   at cr.ac.una.cmis.Main.main(Main.java:19)


The problem is the query, but i don see the error, other querys work.

Allam


1 REPLY 1

allamchz
Champ in-the-making
Champ in-the-making
SELECT cmisSmiley SurprisedbjectId FROM cmis:document WHERE IN_FOLDER('folder id')"

this another query does not work