Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

CommitException while saving the Data programmatically in Content fragment in Cloud AEM

Avatar

Level 2

Hi Team ,

have a requirement to save the Data ( some 3rd party data) into CF and save it programmatically.

While I do it .. it works fine in Local SDK. While I test the same in Dev env getting commitexception. 

using session.save.

 

Any clue when this happens.

 

Regards

Madhu

2 Replies

Avatar

Community Advisor

hi @madhukumari ,

 

it is working on your local as you have admin privileges. This is where the service/system user is helpful. Since get administration resource resolver is deprecated, we are now supposed to get the service user and bind it to your bundle.

make sure you transfer your service user to higher level as well, easy way to do this to use ACS commons(ensure service user) to create a service user, so that you can deploy this in immutable way.

 

create service/system user : https://experienceleague.adobe.com/docs/experience-manager-64/administering/security/security-servic... 

 

Thank you.

Avatar

Level 2

hi Sravan,

 

yes we are using sling mapper service to get the resolver object and then adapt it to session.

 in code i m not using admin session .. 

Recommended way only we are following .

 

Still I see CommitException