AnsweredAssumed Answered

Cant Excute Queries Open Cmis WS

Question asked by andreshades on May 28, 2015
Latest reply on Jun 1, 2015 by andreshades
Hi, i`ve tried ti execute some queries with some example codes i´ve founded. And always get an exception: "Repository ID must Be set!".

This is the code I use, its very simple, taked from apache web:

ItemIterable<QueryResult> results = session.query("SELECT * FROM cmis:document", false);

for(QueryResult hit: results) { 
    for(PropertyData<?> property: hit.getProperties()) {

        String queryName = property.getQueryName();
        Object value = property.getFirstValue();

        System.out.println(queryName + ": " + value);
    }
    System.out.println("————————————–");
}

The session is correctly obtained, with the correct repository ID setted. In fact, i have methods for uploading files, create folders etc. that are working fine.

I´m using chemistry-opencmis-client-impl v0.13.0 with an Alfresco Enterprise 4.2.3.3

Bebugging a litle, i found that the exception appears to be related with the compatibility of versions of the Alfresco server and the open cmis libs that implement the WS methods, because looks like the number of parameters for a method of one of the services does not match with the sended.

Its something like a compatibility table between open cmis libs and Alfresco server versions? Because i`ve benn looking for them without any success…

Thank you in advance.

Outcomes