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()

P_V_Nair
Level 3
Level 3

 

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
Asutosh_Jena_
Correct answer by
Community Advisor
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
Asutosh_Jena_
Correct answer by
Community Advisor
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

Jörg_Hoh
Employee
Employee

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