cancel
Showing results for 
Search instead for 
Did you mean: 

Strange 05010107 Failed to write property deltas error while updating document

pradeepsimha
Champ in-the-making
Champ in-the-making
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.
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator

I know this is an old post, but no one has responded and I just came across the same problem, so I thought I'd post what fixed it for us.

In our case, we were using the CMIS connector in Chronoscan to create documents in Alfresco and set custom aspects and properties on those aspects.

For some reason, all of our aspects were working fine except one. If a document had that aspect, any change to the document properties would fail with a "Failed to write property deltas" error. This error would occur both in the Share user interface and via the Chemistry OpenCMIS Workbench.

The fix was to shut down the server, clear out the solr4/model directory, and restart.

That's the second time this week clearing out the Solr model directory has fixed a problem for one of my clients (two different clients, two very different problems, same solution).

This is Alfresco Enterprise 5.1.3.

jpotts
World-Class Innovator
World-Class Innovator

Just another update...it turns out in one of these cases that the customer was using a third-party scanning software package that leverages CMIS to write to the repository. The configuration was specifying the properties to write metadata to and the configuration was not using the same case as is specified in the content model XML. So, for example, the config was using scSmiley FrustratedomeProp when it should have been using sc:someProp. This caused a transient property to be created called "scSmiley FrustratedomeProp" when the scanner ran, and that was enough to cause the error. The restart cleared the problem. The solution was to correct the scanner config.