AnsweredAssumed Answered

Strange 05010107 Failed to write property deltas error while updating document

Question asked by pradeepsimha on Jun 1, 2014
Latest reply on Oct 17, 2017 by jpotts
Hi Team,

I am trying to update the already existing document properties using below code:


properties.put("ti:prettyUrl", apiListDoc.getPretyUrl());
properties.put("ti:apiAuthHeaders", apiListDoc.getApiHeaders());

String docText = apiListDoc.getPretyUrl();
byte[] content = docText.getBytes();
InputStream stream = new ByteArrayInputStream(content);
ContentStream contentStream = session.getObjectFactory().createContentStream(filename, Long.valueOf(content.length), "text/plain", stream);

session = getCollabEngineSession();
String query = "select * from ti:apiDoc";
List<CmisObject> objs =  cqm.getQueryResults(query);

for(CmisObject obj:objs) {
   String currentBlandUrl = obj.getProperty("ti:prettyUrl").getValueAsString();
            
   if(currentBlandUrl != null) {
      if(currentBlandUrl.equalsIgnoreCase(apiListDoc.getPretyUrl())) {
         doc = (Document) session.getObject(obj.getId());
         doc.updateProperties(properties);
      }
   }
}



But when I run the code, I am getting below error:


Add Tried:     {{http://www.ttatva.com/model/content/1.0}userId=admin}: org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: 05010107 Failed to write property deltas:
Node:          2372
Old:           {}
New:           {{http://www.ttatva.com/model/content/1.0}userId=admin}
Diff:          {{http://www.ttatva.com/model/content/1.0}userId=RIGHT_ONLY}
Delete Tried:  []
Add Tried:     {{http://www.ttatva.com/model/content/1.0}userId=admin}
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:487) [chemistry-opencmis-client-bindings-0.10.0.jar:0.10.0]
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.put(AbstractAtomPubService.java:653) [chemistry-opencmis-client-bindings-0.10.0.jar:0.10.0]
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.put(AbstractAtomPubService.java:640) [chemistry-opencmis-client-bindings-0.10.0.jar:0.10.0]
      at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.updateProperties(ObjectServiceImpl.java:333) [chemistry-opencmis-client-bindings-0.10.0.jar:0.10.0]
      at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.updateProperties(AbstractCmisObject.java:343) [chemistry-opencmis-client-impl-0.10.0.jar:0.10.0]
      at org.alfresco.cmis.client.impl.AlfrescoDocumentImpl.updateProperties(AlfrescoDocumentImpl.java:73) [alfresco-opencmis-extension-0.8.jar:]
      at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.updateProperties(AbstractCmisObject.java:307) [chemistry-opencmis-client-impl-0.10.0.jar:0.10.0]
      at com.ttatva.j2ee.hopscotch.devcenter.appservice.collabengine.CollabEngineManager.createChildDocument(Unknown Source) [collabEngineService.jar:]
      at com.ttatva.j2ee.hopscotch.javacon.web.action.APIDocumentation.insertToDatabase(Unknown Source) [devcentre-webcontroller-action.jar:]
      at com.ttatva.j2ee.hopscotch.javacon.web.action.APIDocumentation.execute(Unknown Source) [devcentre-webcontroller-action.jar:]


I am not even understanding what does that error mean. I am trying continuously from 8-9 hours, but still no luck. I tried to search lot in Google, but found no or little information. Can someone kindly help me or shead some light regarding this issue? Same works fine while creating new document.

Outcomes