Getting persistent exception while trying to commit using resourceResolver.commit() | Community
Skip to main content
New Participant
November 8, 2021
Solved

Getting persistent exception while trying to commit using resourceResolver.commit()

  • November 8, 2021
  • 3 replies
  • 1054 views

 

Getting Persistent exception in the highlighted line of code. 'stageAssetPath' and 'destinationAssetFilePath' are coming correct. Any idea what could be the cause?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Asutosh_Jena_

Please add a check if there are changes in resource resolver and then call the commit().

 

if (resourceResolver.hasChanges()) {
resourceResolver.commit();
}

 

Also without removing the asset, cannot you move the asset to the destination? It's a move operation so it should work.

 

Thanks!

3 replies

joerghoh
Employee
November 11, 2021

Can you please share the complete exception, at best including the stacktrace?

Employee
November 9, 2021
Asutosh_Jena_
Asutosh_Jena_Accepted solution
New Participant
November 9, 2021

Please add a check if there are changes in resource resolver and then call the commit().

 

if (resourceResolver.hasChanges()) {
resourceResolver.commit();
}

 

Also without removing the asset, cannot you move the asset to the destination? It's a move operation so it should work.

 

Thanks!