Hi,
I have created my custom CIF Product Model like this
@Model(adaptables = SlingHttpServletRequest.class, adapters = {Product.class,
CustomCifProduct.class }, resourceType = CustomCifProductImpl.RESOURCE_TYPE)
public class CustomCifProductImpl implements CustomCifProduct {
Whenever I include the resourceType in the Model annotation, I get the following exception and nothing shows on the product page
11.06.2023 01:05:18.276 *ERROR* [[0:0:0:0:0:0:0:1] [1686409518264] GET /content/brand/au/en/our-products/product.html/url-key.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
java.lang.NullPointerException: null
at com.adobe.cq.commerce.core.components.internal.servlets.CatalogPageNotFoundFilter.doFilter(CatalogPageNotFoundFilter.java:114) [com.adobe.commerce.cif.core-cif-components-core:2.12.0]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.adobe.cq.commerce.core.components.internal.servlets.SpecificPageFilterFactory.doFilter(SpecificPageFilterFactory.java:87) [com.adobe.commerce.cif.core-cif-components-core:2.12.0]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:322) [com.day.cq.wcm.cq-wcm-core:5.12.198]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:248) [com.day.cq.wcm.cq-wcm-mobile-core:5.11.10]
The error goes away when I remove the resource type and everything works fine.
The property works fine for all other custom sling models and hence trying to understand what could be the cause and what are the issues if the property is not included?
Thanks
Ruchi