cancel
Showing results for 
Search instead for 
Did you mean: 

Cant Excute Queries Open Cmis WS

andreshades
Champ in-the-making
Champ in-the-making
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.
1 REPLY 1

andreshades
Champ in-the-making
Champ in-the-making
This is the error:

11:17:25,581 [ReflectionServiceFactoryBean] Could not unwrap Operation {http://docs.oasis-open.org/ns/cmis/ws/200908/}query to match method "public abstract org.apache.chemistry.opencmis.commons.impl.jaxb.CmisObjectListType org.apache.chemistry.opencmis.commons.impl.jaxb.DiscoveryServicePort.query(java.lang.String,java.lang.String,java.lang.Boolean,java.lang.Boolean,org.apache.chemistry.opencmis.commons.impl.jaxb.EnumIncludeRelationships,java.lang.String,java.math.BigInteger,java.math.BigInteger,org.apache.chemistry.opencmis.commons.impl.jaxb.CmisExtensionType) throws org.apache.chemistry.opencmis.commons.impl.jaxb.CmisException"

It´s something related with the WRAPPED / BARE property. Any thoughts?