Documentum: Invalid property definition ID was supplied : cmis:contentStreamFileName

605 views Asked by At

I am sending a valid CMIS query to Documentum 7.1 and get a Bad Request response:

GET /emc-cmis/resources/repositories/myrepo/path?p=%2FResources&filter=cmis%3AobjectId%2Ccmis%3Aname%2Ccmis%3AcontentStreamFileName%2Ccmis%3AcontentStreamLength%2Ccmis%3AlastModificationDate%2Ccmis%3AlastModifiedBy%2Ccmis%3Apath%2Ccmis%3AbaseTypeId%2Ccmis%3AobjectTypeId&includeAllowableActions=true&includePolicyIds=false&includeRelationships=none&includeACL=false&renditionFilter= HTTP/1.1
User-Agent: Apache Chemistry DotCMIS
Authorization: Basic dDE6dDE=
Host: documentum:8080

HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
Content-Type: text/plain;charset=UTF-8
Transfer-Encoding: chunked
Date: Fri, 21 Nov 2014 06:45:01 GMT
Connection: close

1630
[CMIS AtomPub binding]

STATUS CODE:
400

EXCEPTION:
filterNotValid

ERROR:
Invalid property definition ID was supplied : cmis:contentStreamFileName

STACK TRACE:
org.cmis.ws.CmisException: Invalid property definition ID was supplied : cmis:contentStreamFileName
.at com.emc.documentum.fs.cmis.impl.dfs.utils.CmisExceptionFactory.create(CmisExceptionFactory.java:24)
.at com.emc.documentum.fs.cmis.impl.dfs.utils.CmisExceptionBuilder.build(CmisExceptionBuilder.java:31)
.at com.emc.documentum.fs.cmis.impl.dfs.converter.object.DataObjectConverter.convertProperty(DataObjectConverter.java:241)
.at com.emc.documentum.fs.cmis.impl.dfs.converter.object.DataObjectConverter.convertProperties(DataObjectConverter.java:212)
.at com.emc.documentum.fs.cmis.impl.dfs.converter.object.DataObjectConverter.getCmisPropertiesByFilter(DataObjectConverter.java:202)
.at com.emc.documentum.fs.cmis.impl.dfs.converter.object.DataObjectConverter.toCmisObject(DataObjectConverter.java:124)
.at com.emc.documentum.fs.cmis.impl.dfs.action.GetObjectByPathAction.execute(GetObjectByPathAction.java:73)
.at com.emc.documentum.fs.cmis.impl.dfs.action.GetObjectByPathAction.execute(GetObjectByPathAction.java:45)
.at com.emc.documentum.fs.cmis.impl.filter.LinkedActionFilterChain.run(LinkedActionFilterChain.java:23)
.at com.emc.documentum.fs.cmis.impl.filter.RequestValidationFilter.doFilter(RequestValidationFilter.java:16)
.at com.emc.documentum.fs.cmis.impl.filter.LinkedActionFilterChain.run(LinkedActionFilterChain.java:21)
.at com.emc.documentum.fs.cmis.rs.impl.resource.ObjectPathResource.getProperties(ObjectPathResource.java:66)
.at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
.at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
.at java.lang.reflect.Method.invoke(Unknown Source)
.at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
.at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
.at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
.at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
.at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
.at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
.at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:134)
.at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
.at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
.at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
.at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
.at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
.at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
.at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
.at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
.at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
.at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
.at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
.at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
.at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
.at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
.at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
.at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
.at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
.at com.emc.documentum.fs.cmis.rs.impl.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:104)
.at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
.at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
.at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
.at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
.at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
.at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
.at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
.at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
.at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
.at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
.at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
.at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
.at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
.at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
.at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
.at java.lang.Thread.run(Unknown Source)

I am 100% sure my request is valid according to the CMIS protocol. It is actually sent by DotCMIS. Documentum answers correctly to GetRepository requests. What is the problem?

Here is the filter field of the request parameters decoded:

  • cmis:objectId
  • cmis:name
  • cmis:contentStreamFileName (the one which seems to be problematic)
  • cmis:contentStreamLength
  • cmis:lastModificationDate
  • cmis:lastModifiedBy
  • cmis:path
  • cmis:baseTypeId
  • cmis:objectTypeId

If I remove the contentStreamFileName filter, Documentum complains about contentStreamLength. If I remove this filter too, I finally get a correct response:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmism="http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns:ns6="http://wadl.dev.java.net/2009/02" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <atom:id>http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130</atom:id>
    <atom:title type="text">Resources</atom:title>
    <atom:author>
        <atom:name>myauthor</atom:name>
    </atom:author>
    <atom:summary type="text">dm_cabinet object</atom:summary>
    <atom:published>2014-10-28T01:19:52.000+09:00</atom:published>
    <atom:updated>2014-10-27T17:28:14.000+09:00</atom:updated>
    <atom:link type="application/atomsvc+xml" rel="service" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo"/>
    <atom:link type="application/atom+xml;type=entry" rel="self" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130" cmisra:id="0c00000180000130"/>
    <atom:link type="application/atom+xml;type=entry" rel="edit" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130" cmisra:id="0c00000180000130"/>
    <atom:link type="application/cmisallowableactions+xml" rel="http://docs.oasis-open.org/ns/cmis/link/200908/allowableactions" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130/actions"/>
    <atom:link type="application/cmisacl+xml" rel="http://docs.oasis-open.org/ns/cmis/link/200908/acl" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130/acl"/>
    <atom:link type="application/atom+xml;type=entry" rel="describedby" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/types/dm_cabinet" cmisra:id="dm_cabinet"/>
    <atom:content>0c00000180000130</atom:content>
    <atom:link type="application/atom+xml;type=entry" rel="up" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130/parents"/>
    <atom:link type="application/atom+xml;type=feed" rel="down" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130/children"/>
    <atom:link type="application/cmistree+xml" rel="down" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130/descendants"/>
    <atom:link type="application/atom+xml;type=feed" rel="http://docs.oasis-open.org/ns/cmis/link/200908/foldertree" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130/tree"/>
    <atom:link type="application/atom+xml;type=feed" rel="http://docs.oasis-open.org/ns/cmis/link/200908/relationships" href="http://192.168.209.100:8080/emc-cmis/resources/repositories/myrepo/objects/0c00000180000130/relationships"/>
    <app:edited>2014-10-27T17:28:14.000+09:00</app:edited>

    <cmisra:object>
        <cmis:properties>
            <cmis:propertyId queryName="cmis:objectId" displayName="Object Id" localName="r_object_id" propertyDefinitionId="cmis:objectId">
                <cmis:value>0c00000180000130</cmis:value>
            </cmis:propertyId>
            <cmis:propertyString queryName="cmis:name" displayName="Name" localName="object_name" propertyDefinitionId="cmis:name">
                <cmis:value>Resources</cmis:value>
            </cmis:propertyString>
            <cmis:propertyDateTime queryName="cmis:lastModificationDate" displayName="Last Modification Date" localName="r_modify_date" propertyDefinitionId="cmis:lastModificationDate">
                <cmis:value>2014-10-27T17:28:14.000+09:00</cmis:value>
            </cmis:propertyDateTime>
            <cmis:propertyString queryName="cmis:lastModifiedBy" displayName="Last Modified By" localName="r_modifier" propertyDefinitionId="cmis:lastModifiedBy">
                <cmis:value>dmadmin</cmis:value>
            </cmis:propertyString>
            <cmis:propertyString queryName="cmis:path" displayName="Folder Path" localName="r_folder_path" propertyDefinitionId="cmis:path">
                <cmis:value>/Resources</cmis:value>
            </cmis:propertyString>
            <cmis:propertyId queryName="cmis:baseTypeId" displayName="Base Type Id" localName="" propertyDefinitionId="cmis:baseTypeId">
                <cmis:value>cmis:folder</cmis:value>
            </cmis:propertyId>
            <cmis:propertyId queryName="cmis:objectTypeId" displayName="Object Type ID" localName="r_object_type" propertyDefinitionId="cmis:objectTypeId">
                <cmis:value>dm_cabinet</cmis:value>
            </cmis:propertyId>
        </cmis:properties>

        <cmis:allowableActions>
            <cmis:canDeleteObject>false</cmis:canDeleteObject>
            <cmis:canUpdateProperties>true</cmis:canUpdateProperties>
            <cmis:canGetFolderTree>true</cmis:canGetFolderTree>
            <cmis:canGetProperties>true</cmis:canGetProperties>
            <cmis:canGetObjectRelationships>true</cmis:canGetObjectRelationships>
            <cmis:canGetObjectParents>true</cmis:canGetObjectParents>
            <cmis:canGetFolderParent>true</cmis:canGetFolderParent>
            <cmis:canGetDescendants>true</cmis:canGetDescendants>
            <cmis:canMoveObject>true</cmis:canMoveObject>
            <cmis:canApplyPolicy>false</cmis:canApplyPolicy>
            <cmis:canGetAppliedPolicies>false</cmis:canGetAppliedPolicies>
            <cmis:canRemovePolicy>false</cmis:canRemovePolicy>
            <cmis:canGetChildren>true</cmis:canGetChildren>
            <cmis:canCreateDocument>true</cmis:canCreateDocument>
            <cmis:canCreateFolder>true</cmis:canCreateFolder>
            <cmis:canCreateRelationship>true</cmis:canCreateRelationship>
            <cmis:canDeleteTree>false</cmis:canDeleteTree>
            <cmis:canGetACL>false</cmis:canGetACL>
            <cmis:canApplyACL>false</cmis:canApplyACL>
        </cmis:allowableActions>
    </cmisra:object>
</atom:entry>
0

There are 0 answers