regarding sitemap schedular | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Himanshu_Singhal
Community Advisor
Community Advisor
January 23, 2023

HI @neeraj_24412 
How're you trying to adapt ca-config for sitemap scheduler? 

neeraj_24412
January 23, 2023

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() : ""; }

This is the output with schedular

and without schedular it's working fine

here is my ca-config

 

neeraj_24412
January 28, 2023

Hi @neeraj_24412 

 

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

 

Thanks,

Nupur


Hi @nupur_jain,

This is an existing method for creating sitemap,,

So I override it

Mani_kumar_
Community Advisor
Community Advisor
January 23, 2023

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.

 

 

neeraj_24412
January 23, 2023

Hi @mani_kumar_ Yeah it's same in both 

Mani_kumar_
Community Advisor
Community Advisor
January 23, 2023

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-configs-object-quot-caconfig-quot-not/m-p/271997

 

Hope this is helpful

Anudeep_Garnepudi
Community Advisor
Community Advisor
January 24, 2023

@neeraj_24412 

 

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. 

neeraj_24412
January 24, 2023

Yeah it's null any solution for this?

 

It is null for all-on-demand too

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

Anudeep_Garnepudi
Community Advisor
Community Advisor
January 24, 2023

What is resource path in both cases?