Expand my Community achievements bar.

NullPointerException on Product Rollout

Avatar

Level 2

Hi all.

We always get the exception bellow while trying to rollout a catalog. Can someone help us with this problem?

31.08.2017 19:50:57.616 *DEBUG* [10.41.21.120 [1504201857027] POST /bin/wcmcommand HTTP/1.1] com.adobe.cq.commerce.pim.impl.cataloggenerator.CatalogGeneratorImpl product page /content/<removed on porpuse>/<removed on porpuse>/europe/de/de/<removed on porpuse>/bagger/mobilbagger/m312-6tl00866 for /etc/commerce/products/<removed on porpuse>/<removed on porpuse>/europe/de/usedmachines/p01_erdbewegung/p01054_mobilbagger/m312-6tl00866 exists, do a rollout

31.08.2017 19:50:57.618 *ERROR* [10.41.21.120 [1504201857027] POST /bin/wcmcommand HTTP/1.1] com.adobe.cq.commerce.pim.impl.cataloggenerator.RolloutSectionCommand Rollout failed for /content/zeppelin/gebrauchtmaschine/europe/de/de/produkte-_-loesungen/bagger.

java.lang.NullPointerException: null

at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.getLiveRelationship(LiveRelationshipManagerImpl.java:203)

at com.adobe.cq.commerce.pim.impl.cataloggenerator.CatalogGeneratorImpl$Worker.rolloutProductPage(CatalogGeneratorImpl.java:765)

at com.adobe.cq.commerce.pim.impl.cataloggenerator.CatalogGeneratorImpl$Worker.updateProducts(CatalogGeneratorImpl.java:634)

at com.adobe.cq.commerce.pim.impl.cataloggenerator.CatalogGeneratorImpl$Worker.updateSections(CatalogGeneratorImpl.java:594)

at com.adobe.cq.commerce.pim.impl.cataloggenerator.CatalogGeneratorImpl$Worker.rolloutChanges(CatalogGeneratorImpl.java:554)

at com.adobe.cq.commerce.pim.impl.cataloggenerator.CatalogGeneratorImpl.rolloutChanges(CatalogGeneratorImpl.java:287)

at com.adobe.cq.commerce.pim.impl.cataloggenerator.RolloutSectionCommand.performCommand(RolloutSectionCommand.java:86)

at com.day.cq.wcm.core.impl.commands.WCMCommandService$CommandHolder.performCommand(WCMCommandService.java:178)

at com.day.cq.wcm.core.impl.commands.WCMCommandServlet.performCommand(WCMCommandServlet.java:111)

at com.day.cq.commons.servlets.AbstractCommandServlet.doPost(AbstractCommandServlet.java:49)

at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:346)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:378)

at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)

at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)

at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at io.wcm.sling.commons.request.impl.RequestContextFilterImpl.doFilter(RequestContextFilterImpl.java:59)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375)

at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)

at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:71)

at com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler.doFilter(AdhocAssetShareAuthHandler.java:436)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.dam.core.impl.servlet.ActivityRecordHandler.doFilter(ActivityRecordHandler.java:154)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:109)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet.doFilter(SaferSlingPostServlet.java:126)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)

at com.adobe.granite.rest.impl.servlet.ApiResourceFilter.doFilter(ApiResourceFilter.java:70)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.requests.logging.impl.RequestLoggerImpl.doFilter(RequestLoggerImpl.java:113)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.rest.assets.impl.AssetContentDispositionFilter.doFilter(AssetContentDispositionFilter.java:96)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:217)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.security.impl.ContentDispositionFilter.doFilter(ContentDispositionFilter.java:180)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:367)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:248)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.cq.social.commons.cors.CORSAuthenticationFilter.doFilter(CORSAuthenticationFilter.java:91)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:221)

at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:138)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:76)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:221)

at com.adobe.cq.wcm.core.components.internal.servlets.CoreFormHandlingServlet.doFilter(CoreFormHandlingServlet.java:131)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.cq.history.impl.HistoryRequestFilter.doFilter(HistoryRequestFilter.java:122)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.cq.mcm.campaign.servlets.CampaignCopyTracker.doFilter(CampaignCopyTracker.java:100)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:81)

at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:60)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)

at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:83)

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)

at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)

at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:219)

at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)

at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:295)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:138)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:72)

at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)

at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)

at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128)

at org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

at org.eclipse.jetty.server.Server.handle(Server.java:499)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)

at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

at java.lang.Thread.run(Thread.java:748)

11 Replies

Avatar

Level 10

This does not contain enough information for community to help you. What AEM version are you using. Can you post some of your code so ppl can see exactly what you are trying to do.

Avatar

Level 2

We are getting the exact same issue. We are using AEM 6.1 without SP.

The rollout happens successfully for the first time and them from second time onwards, we get this exception.

Avatar

Level 2

We are also getting similar error with AEM 6.3 on our test environment but on local environment it works as expected. We are creating custom commerce provider. This looks it didn't worked with same error while trying to rollout from the master catalog which is using default template - /libs/commerce/templates/catalog

Error logs as:

21.02.2018 12:29:40.692 *ERROR* [172.17.139.146 [1519216180661] POST /bin/wcmcommand HTTP/1.1] com.adobe.cq.commerce.pim.impl.cataloggenerator.CatalogGeneratorImpl Rollout hook failed for /content/<project>/es/es_es/products.

java.lang.NullPointerException: null

at com.adobe.cq.commerce.pim.impl.cataloggenerator.CatalogGeneratorImpl.executePageRolloutHooks(CatalogGeneratorImpl.java:898)

at com.adobe.cq.commerce.pim.impl.cataloggenerator.CatalogRolloutHooksActionFactory$CatalogRolloutHooksAction.execute(CatalogRolloutHooksActionFactory.java:102)

at com.day.cq.wcm.msm.impl.RolloutManagerImpl.rolloutResource(RolloutManagerImpl.java:803)

at com.day.cq.wcm.msm.impl.RolloutManagerImpl.rolloutPage(RolloutManagerImpl.java:706)

at com.day.cq.wcm.msm.impl.RolloutManagerImpl.rolloutPageRelations(RolloutManagerImpl.java:599)

at com.day.cq.wcm.msm.impl.RolloutManagerImpl.rollout(RolloutManagerImpl.java:501)

at com.day.cq.wcm.msm.impl.commands.RolloutCommand.performCommand(RolloutCommand.java:151)

at com.day.cq.wcm.core.impl.commands.WCMCommandService$CommandHolder.performCommand(WCMCommandService.java:178)

at com.day.cq.wcm.core.impl.commands.WCMCommandServlet.performCommand(WCMCommandServlet.java:111)

at com.day.cq.commons.servlets.AbstractCommandServlet.doPost(AbstractCommandServlet.java:49)

If any of you cduque89 @w0lver!n3 has resolved or know where could be the issue. I already tried comparing all the commerce services in OSGi Console and also tried comparing rollout configs with local instance where its working smoothly.

​ Can you please take a look and suggest if there something need to checked?

Avatar

Level 2

Hi Rohan Raj​.

Can you provide the .content.xml file for the template you are using in the catalog? Specially the one for product pages?

I might be able to help you if I see that file.

Avatar

Level 2

This is the content xml for Product page in /content/catalogs/<project>/products/website-template-pages

<?xml version="1.0" encoding="UTF-8"?>

<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

    jcr:primaryType="cq:Page">

    <jcr:content

        cq:lastModified="{Date}2018-02-16T12:43:51.451Z"

        cq:lastModifiedBy="admin"

        cq:template="/apps/proj/templates/productdetailtemplate"

        jcr:primaryType="cq:PageContent"

        jcr:title="Product Detail Page"

        sling:resourceType="proj/components/structure/productdetailpage">

        <image jcr:primaryType="nt:unstructured">

            <file/>

        </image>

    </jcr:content>

</jcr:root>

Did you mean this or any other .content.xml

Avatar

Level 2

Hi cduque89,

​Can you please point me where should I see to get this issue resolved?

I even tried replacing all the templates with my local packaging it up from local. Still no luck.

​Rohan.

Avatar

Level 2

Try to add after </image>

<product
   cq:commerceType="product"
   jcr:primaryType="nt:unstructured"
   sling:resourceType="<same resource type as your product cq:template>"/>

Try that and let me know if it works. If I remember correctly it was this that fixed my issue some time ago.

Avatar

Level 2

Hi cduque89

Tried the above, no luck it didn't solved the issue in my integration environment.

Rohan.

Avatar

Level 2

For all those who are facing this issue, we managed to resolve it by providing a dummy product component in the live copy pages. Added it to the templates as well so that the new pages will contain it by default.

It is just an empty component. Basically the MSM framework checks for the resource 'product' with mandatory property: 'cq:commerceType', value: 'product'.

Avatar

Level 2

I am also facing similar issue where it works for the first time and throws NPE from 2nd time onwards. Any resolution to this ? The logs don't tell exact details about the node / page which has issue. 

 

++ @kautuk_sahni