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

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

  • November 8, 2021
  • 3 replies
  • 1061 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

Asutosh_Jena_
Community Advisor
Asutosh_Jena_Community AdvisorAccepted solution
Community Advisor
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!

Adobe Employee
November 9, 2021
joerghoh
Adobe Employee
Adobe Employee
November 11, 2021

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