I've seen several sets of code in the Hub that shows the same approach as I am using, but nothing that seems like it would mitigate this issue. Anyone have any ideas? I tried doing a try/catch block around the createFolder and that seemed to stop the exception but we always ended up in the catch block whether the createFolder should have worked or not.
Re: Create Folder causing exception when when created concurrently
In this case the documentation is indeed incorrect. The method will never return null and failures to create will be reported by exceptions, like in your case. Doing many concurrent requests / creations on the same elements is always a recipe for disaster unless retrying transaction semantics are being used - unfortunately, a FileExistsException by default will not trigger the transaction to retry unless it is manually rethrown wrapped in an exception which does, or Alfresco is reconfigured to consider FileExistsException as retryable (the latter is a bad idea, because the exception can also be triggered by bad programming, e.g. not checking if an element exists before attempting to create it).