chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <>
Subject [jira] [Commented] (CMIS-889) CmisObjectNotFoundException when creating if document is deleted in transaction
Date Tue, 03 Feb 2015 16:40:35 GMT


Florian Müller commented on CMIS-889:

Use {{[Session.createDocument()|,%20org.apache.chemistry.opencmis.client.api.ObjectId,,%20org.apache.chemistry.opencmis.commons.enums.VersioningState%29]}}
instead of {{Folder.createDocument()}}.

{{Folder.createDocument()}} tries to load the document after it has been created to return
a {{Document}} object. {{Session.createDocument()}} only returns the document ID and does
not need to load the document.

Alternatively, use {{[Folder.createDocument()|,,%20org.apache.chemistry.opencmis.commons.enums.VersioningState,%20java.util.List,%20java.util.List,%20java.util.List,%20org.apache.chemistry.opencmis.client.api.OperationContext%29]}}
and supply {{null}} as the operation context. That also prevents loading the newly created

> CmisObjectNotFoundException when creating if document is deleted in transaction
> -------------------------------------------------------------------------------
>                 Key: CMIS-889
>                 URL:
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.12.0
>         Environment: CMIS Workbench Groovy Console
>            Reporter: Igor Blanco
>            Priority: Minor
> I'm using Folder object's createDocument method to upload a file to an Alfresco folder.
I have a rule on that folder tha takes some information from the file and then deletes it.
> Everything works in Alfresco as expected but the createDocument method throws a CmisObjectNotFoundException.
I suppose this is due to the fact that the document that it is trying to return is already
a deleted content by the time the call ends. 
> Is there any reasonable way of doing this apart from catching the exception ?  I thought
about not deleting the file in Alfresco and letting cmis do so but that would imply that 2
transactions would be used and potentially the operation could end in the middle of both of
> I'm aware this is more a question for a forum than a bug but couldn't find a proper forum
for OpenCMIS and writing it to the developer mailing list was IMHO an even worse option.

This message was sent by Atlassian JIRA

View raw message