Most notable is the CommitFailedException Based Exclusively on the interment errors from your code, I would suggest converting the ResourceResolver to Session first as the 'Session' is used to manage transactions to make use of the 'refresh' method.Doing so should at least elminate the CommitFailed...