<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ConcurrencyFailureException: Failed to update node in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300047#M253177</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ramesh, but don't works. I put the getItsLocked and returns me that the node isn't locked. But when I try to change the properties, throws the concurrency exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are something in the Alfresco Explorer that when delete a son folder of a node, the properties of that node can't be changed. The node isn't blocked because I can create a new node and put like a child of this node. And if I don't change the properties all goes ok. The problem is only with the properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;More ideas? I don't have anything more &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;(&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 May 2014 09:49:20 GMT</pubDate>
    <dc:creator>spilby</dc:creator>
    <dc:date>2014-05-22T09:49:20Z</dc:date>
    <item>
      <title>ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300039#M253169</link>
      <description>I'm using Alfresco Enterprise v4.1.6I create a new node and then modify some properties of the parents doing a getNodeService().addProperties.Sometimes, this addProperties fails and give me a org.springframework.dao.ConcurrencyFailureException: Failed to update node 288941And when it occurs, I can't</description>
      <pubDate>Mon, 19 May 2014 08:25:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300039#M253169</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-19T08:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300040#M253170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is an expected exception that is handled automatically (by retry) in Alfresco's RetryingTransactionHandler.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can't see the node because its not been created!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please correct your transaction handling or post your code so others may point out the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 09:44:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300040#M253170</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-05-19T09:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300041#M253171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oks, this is a resume of my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First I create the folders with my own properties. I create various nodes calling this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; NodeRef nodeRef = getNodeService().createNode(parent, ContentModel.ASSOC_CONTAINS, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, name),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QName.createQName(Constants.myModel, Constants.myDocumentType), &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; properties).getChildRef();&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I finish, I update a document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; writer = getContentService().getWriter(nodeRef, ContentModel.PROP_CONTENT, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; writer.putContent(inputStream);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And then, I modify various properties, from the child node to the root calling recursively a method. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; private void modifyProperties(NodeRef nodeRef) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map&amp;lt;QName, Serializable&amp;gt; updateableProperties = changeProperties(…);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; getNodeService().addProperties(nodeRef, updateableProperties); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeRef parent = getNodeService().getPrimaryParent(nodeRef).getParentRef();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!isRoot) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; modifyProperties(parent);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I log all of this, and the createNode and putContent seems goes ok, because the createNode gives me a nodeRef. I log this nodeRef with a getPath and gives me a path with the new folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The "ConcurrencyFailureException: Failed to update node" is thrown when I do the getNodeService().addProperties. In this point, the exceptions appears. But appears sometimes. Doing the same, I delete the folders and test the same, and sometimes do all ok, and other times gives me the exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can see something wrong? I don't know where is the error. Need more information?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 11:49:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300041#M253171</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-19T11:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300042#M253172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That code is O.K.&amp;nbsp; In particular there is no incorrect catching of exceptions. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But how is it running?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example if its a webscript or action then the transaction is already started for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;—-&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While that algorithm should be O.K. for small volumes you are going to cause contention on your parent nodes.&amp;nbsp;&amp;nbsp; May be worth re-considering your requirements and implementation for larger volumes. &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 12:15:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300042#M253172</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-05-19T12:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300043#M253173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's a java backed webscript. Arrives an XML to another platform, a petition to create a number of paths, with a name, some properties and a path where I can find a archive. Then, this platform call by REST to my java backed webscript, who do the work to create these nodes and upload the archive.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The last point that recommends me, where is the problem for larger volumes? I'm sorry, I work with this API since a few weeks ago and don't know how it can be better for large volumes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks mrogers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 14:33:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300043#M253173</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-19T14:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300044#M253174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have more information about this error…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In resume, my java webscript do this: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Create various nodes: A, B, C, D, making a path A/B/C/D&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Put a content in the node D. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. addProperties on A, B, C nodes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I run the webscript, and do all ok.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ConcurrencyFailureException occurs exactly when:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I go to the Alfresco Repository Navigator and delete manually the folder B. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, I run another time my webscript. Create the nodes ok, put the content ok, begin to modify the properties ok, but when try to modify the properties of the node A, throw this exception. And I can't do anything until I restart the alfresco server. When I delete the folder with the navigator, seems to blocks the A node and I can't modify these properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does it make sense? Where is the problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please, if someone have a information about this… it's important to resolve. Thanks again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:21:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300044#M253174</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-20T13:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300045#M253175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem continues… I don't know what can I do to resolve it. Anyone have a similar problem? How do you update your properties protecting your node for the concurrency exception? Deleting a folder with the alfresco explorer may cause problems? Some information could help me, thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 05:33:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300045#M253175</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-22T05:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300046#M253176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you give a try using LockService on a node to check if the node is locked or not. If a node is locked then don't do anything. Only proceed when a node is not locked. See if this help you solve your problem or not. Take a look at getIsLocked() method in ScriptNode class for how to implement this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 06:26:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300046#M253176</guid>
      <dc:creator>romschn</dc:creator>
      <dc:date>2014-05-22T06:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300047#M253177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Ramesh, but don't works. I put the getItsLocked and returns me that the node isn't locked. But when I try to change the properties, throws the concurrency exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are something in the Alfresco Explorer that when delete a son folder of a node, the properties of that node can't be changed. The node isn't blocked because I can create a new node and put like a child of this node. And if I don't change the properties all goes ok. The problem is only with the properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;More ideas? I don't have anything more &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;(&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 09:49:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300047#M253177</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-22T09:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300048#M253178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;IIRC There's a check in the node service that you cant add a child to a deleted node (Otherwise you can get into infinite loops when using policies)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's also probably a check to stop you updating a deleted node since that makes no sense.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suspect there's something else going on in your code that you have not mentioned.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 10:13:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300048#M253178</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-05-22T10:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300049#M253179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One more thought would be to separate out your folder creation logic and adding properties logic in two different transactions programmatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;UserTransaction trx_A = transactionService.getNonPropagatingUserTransaction();&lt;BR /&gt;try{&lt;BR /&gt;trx_A.begin();&lt;BR /&gt;//Folder Creation logic&lt;BR /&gt;trx_A.commit();&lt;BR /&gt;} catch(Throwable e) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trx_A.rollback();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} catch (Throwable ee) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;//Create another transaction and do same as above and add properties add logic if folder creation was success&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, for deletion part, i am assuming you want to delete child folder and update parent folder's property. For this scenario as well separate the logic in two different transaction as mentioned above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See implementing this way works for you or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 10:17:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300049#M253179</guid>
      <dc:creator>romschn</dc:creator>
      <dc:date>2014-05-22T10:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300050#M253180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;But I don't add a child to a delete node. I delete a node with the alfresco explorer and create again with my webscript. And if I don't update the properties, all works ok. The node is created without problems, and I can see it in Alfresco Explorer. Only the updating properties give the problem.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe is complicate to explain… In resume:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Run webscript. It creates a folder A, a folder B, a folder C, puts a content in C and update properties of C, B and A. (THIS WORKS) Path obtained: A / B / C &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Go to Alfresco Explorer and delete the node B.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- Run webscript. It creates a folder B (child of A), create a folder C, put a content in C, update the properties of C, B and when try to update the properties of A, throw the concurrency exception. Path obtained: A &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I change my code and don't change properties, only create nodes and put content, all works. Only the getNodeService().addProperties gives the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I try to wait 1 minute before update the properties, but the same error. The properties are blocked forever if I delete the node with Alfresco Explorer. Only if i restart the server I can update the properties again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 10:38:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300050#M253180</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-22T10:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300051#M253181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To delete the folder I use the Alfresco Explorer. One thing that I don't understand is that the webscript works fine until I delete from Explorer. I run my webscript X times and works all of them. Only don't works after the delete. And the webscript is the same. And if I restart the server the webscript works again. I supose that if my code don't works, the exception throws always, not only after the delete of the node with the explorer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is possible that the explorer have a problem that blocks the modification of the properties of a node, if I delete one of his sons, until the restarting of the server? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 10:47:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300051#M253181</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-22T10:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300052#M253182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What options you select while deleting the parent space from alfresco explorer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 10:56:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300052#M253182</guid>
      <dc:creator>romschn</dc:creator>
      <dc:date>2014-05-22T10:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300053#M253183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I put the mouse over the folder, click on More, and then Delete folder. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I attach a image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 11:41:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300053#M253183</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-22T11:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300054#M253184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you able to manually generate the scenario? I mean, Create a folder structure manually, delete the child&amp;nbsp; and then add the properties on the parent (through aspect or try modifying existing properties) and see if that causes the problem or not. Again create the same folder hierarchy and repeat the steps and see if it triggers the problem or not. Try following same thing as you do programmatically and see what is the outcome of it. This may help to understand and identify where to look into further to find the solution for the issue you are facing. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 12:03:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300054#M253184</guid>
      <dc:creator>romschn</dc:creator>
      <dc:date>2014-05-22T12:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300055#M253185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ramesh, I try your solution with transactions, and works! &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;) I insert my methods inside the begin and commit, and seems that the problem has been solved. A lot of thanks, Ramesh!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Two questions about this. Is a good practice use always transactions? In the examples that I read on tutorials or forums, don't use usually transactions. Maybe in my case, that do different actions in the same webscript, like create nodes or update properties, is the most correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the other… Why getNonPropagatingUserTransaction and not getUserTransaction? What's the difference?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 12:49:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300055#M253185</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-22T12:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300056#M253186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There's Clearly&amp;nbsp; something strange going on and you have a transaction deadlock.&amp;nbsp;&amp;nbsp; You may be able to get more info from your database admin tool.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But if you do want to take control of your transaction then use the RetryingTransactionHelper which ensures that transactions are retried and closed correctly in all situations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 21:26:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300056#M253186</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2014-05-22T21:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300057#M253187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad it worked for you and you finally are now able to get rid of the exception you were getting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Generally, it is not suggested to explicitly handle the transactions in the custom code. However, to my opinion, if required we can use the explicit transactions to meet the requirement and good thing is that Transaction Service provides the required APIs to do that so we can leverage on it. In your scenario it appears that it was something related to transaction which was causing the exception. Hence, handling the transactions explicitly we made sure that we have the processed node for adding properties hence it should not cause any exceptions on it while adding the properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason for using non-propagating transaction is - it uses the propagation as REQUIRES_NEW. Hence, each time a new transaction will be created wherein user transaction use the propagation as REQUIRES which means that if the transaction is already running it will take that or else will create a new transaction. So, in order to make sure that each time a new transaction is used non-propagating transaction was mentioned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this answers your question.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 06:28:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300057#M253187</guid>
      <dc:creator>romschn</dc:creator>
      <dc:date>2014-05-23T06:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: ConcurrencyFailureException: Failed to update node</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300058#M253188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, it seems that something when I delete the node from the Alfresco Explorer blocks a transaction with the properties, and the commit on all the transactions that I do before change the properties, solve this issue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is strange because if I don't put the UserTransaction in the code, each operation (createNode, putContent, addProperties, etc) is doing with her own transaction (if I understand it). Control the transaction only serves for doing 2 or more operations in a same transaction. But isn't my case. I do a transaction for each operation. But I need to put it to solve the concurrency exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One question more about the non-propagating… Oks, the non-propagating (REQUIRES_NEW) ensures that the transaction is new always. I supose that the problem using the getUserTransaction is that if the transaction is already running, and I use that, the concurrency problem may appears another time. But use always a new transaction, could give me problems of performance? A lot of users will use this service, and for each one the code will use 4 o 5 transactions (one for each operation). This could cause problems? In which times is better use the running transaction (getUserTransaction option)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 07:29:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/concurrencyfailureexception-failed-to-update-node/m-p/300058#M253188</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-23T07:29:00Z</dc:date>
    </item>
  </channel>
</rss>

