CommitException while saving the Data programmatically in Content fragment in Cloud AEM | Community
Skip to main content
Level 2
September 12, 2022

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

  • September 12, 2022
  • 1 reply
  • 754 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

B_Sravan
Community Advisor
Community Advisor
September 12, 2022

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-service-users.html?lang=en 

 

Thank you.

Level 2
September 12, 2022

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