Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Avatar

Level 4

 

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?