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

regarding sitemap schedular

Avatar

Level 2

Hi all,
i am using schedular to generate sitemap,but I am not able to adapt ca-config at the time of schedular,

But in case of All-on-demand it working,
Please help me to resolve this problem.

Topics

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

12 Replies

Avatar

Level 2

HI @Himanshu_Singhal,
So I need to create sitemap for multi site,

public String getSiteUrl(Resource resource) {
final GlobalConfiguration globalConfiguration = resource.adaptTo(ConfigurationBuilder.class)
.as(GlobalConfiguration.class);
return StringUtils.isNotBlank(globalConfiguration.siteHostUrl()) ? globalConfiguration.siteHostUrl() : "";
}
12neeraj_0-1674483325735.png

This is the output with schedular

12neeraj_0-1674483481822.png

and without schedular it's working fine

12neeraj_1-1674483773689.png

here is my ca-config

12neeraj_2-1674483817658.png

 

Avatar

Community Advisor

Hi @neerajsankalia 

 

Can you tell or add screenshot here that how are you getting the resource which you are passing to addResource Method?

 

Thanks,

Nupur

Avatar

Level 9

Can you check which resource is passed to the method while calling the from scheduler ?

Check if both the resources are same in On-demand and from scheduler.

 

 

Avatar

Level 9

Below thread explains on the permissions that needs to /conf folder, could you please check if you have enough permissions to read the resource.

If not provide the required permissions and restrict it through the dispatcher.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-6-3-contextaware-confi...

 

Hope this is helpful

Avatar

Community Advisor

@neerajsankalia 

 

Can you check if your GlobalConfiguration is null, if resource is same in both the scenarios then it should not be null. Log the resource path and check once. 

Avatar

Level 2

Yeah it's null any solution for this?

 

It is null for all-on-demand too

neerajsankalia_0-1674545426273.png

but somehow I am able to get values from ca-config in the case of all-on-demand

Avatar

Level 2

neerajsankalia_0-1674555979088.png

This one is when all-on-demand enable,
---------------------------------------------------------------------------

neerajsankalia_1-1674556113679.png


This is when using schedular

seems same for both cases