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.
SOLVED

ExperienceFragmentsService is not working

Avatar

Level 7

Hi Team,

 

I'm using ExperienceFragmentsService in servlet but while calling the servlet, I'm getting 404 resource not found. Whenever I remove/comment the below declaration then the servlet is working fine. I'm using AEM6.5 version.
@reference
ExperienceFragmentsService experienceFragmentsService ;

Is there any other way to get this service to use it? Kindly help.

Best Regards,

AryA

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Dinu_Arya 

 Can you try creating instance using ExperienceFragmentsServiceFactory

Sharing sample code:

@Reference
	ExperienceFragmentsServiceFactory experienceFragmentsServiceFactory;
	ExperienceFragmentsService service=experienceFragmentsServiceFactory.getExperienceFragmentsService(resourceResolver);

 

Thanks

Dipti

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @Dinu_Arya 

 Can you try creating instance using ExperienceFragmentsServiceFactory

Sharing sample code:

@Reference
	ExperienceFragmentsServiceFactory experienceFragmentsServiceFactory;
	ExperienceFragmentsService service=experienceFragmentsServiceFactory.getExperienceFragmentsService(resourceResolver);

 

Thanks

Dipti