Expand my Community achievements bar.

SOLVED

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

Avatar

Adobe Champion

 

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

P_V_Nair_0-1636402354371.png

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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!

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

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!

Avatar

Employee Advisor

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