diff --git a/source/java/org/alfresco/rest/api/impl/NodesImpl.java b/source/java/org/alfresco/rest/api/impl/NodesImpl.java index caf7181b15..eef07c46d5 100644 --- a/source/java/org/alfresco/rest/api/impl/NodesImpl.java +++ b/source/java/org/alfresco/rest/api/impl/NodesImpl.java @@ -121,6 +121,7 @@ import org.alfresco.util.Pair; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.dao.ConcurrencyFailureException; import org.springframework.extensions.surf.util.Content; import org.springframework.extensions.webscripts.servlet.FormData; import org.springframework.http.InvalidMediaTypeException; @@ -692,6 +693,11 @@ public class NodesImpl implements Nodes { throw new PermissionDeniedException(ade.getMessage()); } + catch (FileExistsException fex) + { + // Assume concurrency failure, so retry + throw new ConcurrencyFailureException(fex.getMessage()); + } } else if (!isSubClass(nodeRef, ContentModel.TYPE_FOLDER, false)) {