6 Replies Latest reply on Feb 22, 2018 12:39 AM by dylanr46798176

    AEM with Hybris 6.3 documentation not working properly

    dylanr46798176 Level 1

      Recently, I was working on a POC to connect Hybris with AEM. It seems to me as the docs aren't really up-to-date.

       

      When looking at the setup.groovy file, it tries to replace the "tokenStore" bean from Hybris, which doesn't exist anymore (or at least not on that place), since Hybris 6 I was told.

       

      Also, you are required to create 2 OAuth Handlers in Hybris through the backoffice. One mobile_android and one trusted_client.

       

      An interesting page for this was https://www.albinsblog.com/2018/01/how-to-integrate-adobe-experience-manager-aem-and-sap-h ybris-through-oob-connecter.ht…

       

      smacdonald2008 would it be possible to file a bug against the documentation somewhere? If so, please provide the link, just in case I find some more bugs in there.

       

      Kind regards

      Dylan

        • 1. Re: AEM with Hybris 6.3 documentation not working properly
          dylanr46798176 Level 1

          So far, I've found 2 more errors:

           

          When importing the cq-geometrixx-hybris-content-6.3.2 package, there is an error when importing /content/catalogs/geometrixx-outdoors-hybris xml, you will see the following line:

           

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

              jcr:primaryType="sling:Folder">

           

          This needs to be changed to

           

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

              jcr:primaryType="sling:Folder">

           

           

          When opening a product page, I see the following error appear:

           

          Caused by: java.lang.StackOverflowError: null

          at org.apache.jackrabbit.oak.segment.Segment.dereferenceSegmentId(Segment.java:495)

          at org.apache.jackrabbit.oak.segment.Segment.internalReadRecordId(Segment.java:482)

          at org.apache.jackrabbit.oak.segment.Segment.readRecordId(Segment.java:470)

          at org.apache.jackrabbit.oak.segment.MapRecord.getEntry(MapRecord.java:217)

          at org.apache.jackrabbit.oak.segment.SegmentNodeState.getChildNode(SegmentNodeState.java:412 )

          at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.<init>(MemoryNodeBuilder.java: 143)

          at org.apache.jackrabbit.oak.segment.SegmentNodeBuilder.<init>(SegmentNodeBuilder.java:74)

          at org.apache.jackrabbit.oak.segment.SegmentNodeBuilder.createChildBuilder(SegmentNodeBuilde r.java:125)

          at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.getChildNode(MemoryNodeBuilder .java:331)

          at org.apache.jackrabbit.oak.core.SecureNodeBuilder.<init>(SecureNodeBuilder.java:116)

          at org.apache.jackrabbit.oak.core.SecureNodeBuilder.getChildNode(SecureNodeBuilder.java:329)

          at org.apache.jackrabbit.oak.core.MutableTree.createChild(MutableTree.java:93)

          at org.apache.jackrabbit.oak.core.MutableTree.createChild(MutableTree.java:37)

          at org.apache.jackrabbit.oak.plugins.tree.impl.AbstractTree.getChild(AbstractTree.java:240)

          at org.apache.jackrabbit.oak.core.MutableTree.getChild(MutableTree.java:161)

          at org.apache.jackrabbit.oak.util.TreeUtil.getTree(TreeUtil.java:172)

          at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.getTree(NodeDelegate.java:897)

          at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.getChild(NodeDelegate.java:339)

          at org.apache.jackrabbit.oak.jcr.session.NodeImpl$7.perform(NodeImpl.java:540)

          at org.apache.jackrabbit.oak.jcr.session.NodeImpl$7.perform(NodeImpl.java:536)

          at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:208)

          at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)

          at org.apache.jackrabbit.oak.jcr.session.NodeImpl.getNode(NodeImpl.java:536)

          at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getSubitem(JcrIt emResourceFactory.java:144)

          at org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(J crItemResourceFactory.java:94)

          at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.getResource(JcrReso urceProvider.java:300)

          at org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.g etResource(AuthenticatedResourceProvider.java:135)

          at org.apache.sling.resourceresolver.impl.helper.ResourceResolverControl.getResource(Resourc eResolverControl.java:224)

          at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getAbsoluteResourceInternal(R esourceResolverImpl.java:1045)

          at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getResourceInternal(ResourceR esolverImpl.java:671)

          at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getResource(ResourceResolverI mpl.java:642)

          at com.day.cq.commons.inherit.HierarchyNodeInheritanceValueMap.getParentPageValue(HierarchyN odeInheritanceValueMap.java:139)

          at com.day.cq.commons.inherit.HierarchyNodeInheritanceValueMap.getParentPageValue(HierarchyN odeInheritanceValueMap.java:152)

          at com.day.cq.commons.inherit.HierarchyNodeInheritanceValueMap.getParentPageValue(HierarchyN odeInheritanceValueMap.java:152)

          at com.day.cq.commons.inherit.HierarchyNodeInheritanceValueMap.getInherited(HierarchyNodeInh eritanceValueMap.java:92)

          at com.adobe.cq.commerce.impl.CommerceAdapterFactory.getAdapter(CommerceAdapterFactory.java: 188)

          at com.adobe.cq.commerce.impl.CommerceAdapterFactory.getAdapter(CommerceAdapterFactory.java: 166)

          at org.apache.sling.adapter.internal.AdapterManagerImpl.getAdapter(AdapterManagerImpl.java:1 47)

          at org.apache.sling.api.adapter.SlingAdaptable.adaptTo(SlingAdaptable.java:104)

          at org.apache.sling.jcr.resource.internal.helper.jcr.JcrNodeResource.adaptTo(JcrNodeResource .java:178)

          at com.adobe.cq.commerce.common.AbstractJcrProduct.getBaseProduct(AbstractJcrProduct.java:46 7)

          at com.adobe.cq.commerce.common.AbstractJcrProduct.getVariants(AbstractJcrProduct.java:441)

          at com.adobe.cq.commerce.common.AbstractJcrProduct.getVariants(AbstractJcrProduct.java:424)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:58)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

          at com.adobe.cq.commerce.hybris.common.HybrisProduct.getVariantAxes(HybrisProduct.java:66)

           

          ...

          It seems to get stuck in a endless loop in the HybrisProduct:66 line

          • 2. Re: AEM with Hybris 6.3 documentation not working properly
            smacdonald2008 Adobe Employee

            I will file a bug against the docs - anytime a doc topic does not work - let us know via the forums and we will post a doc bug. If its a HELPX article - we can fix it right away. But before we post HELPX articles - we have community members like Ratna test them to make sure they work!

            • 4. Re: AEM with Hybris 6.3 documentation not working properly
              Ratna Kumar Level 4

              Hi,

               

              Yes, Scott is right.

               

              We used to test the each and every HELPX community article before posting and to make sure it works!!

               

              Thanks,

              Ratna.

              • 5. Re: AEM with Hybris 6.3 documentation not working properly
                dylanr46798176 Level 1

                Alright thanks!

                 

                Also, I saw on the Hybris integration page (Developing with hybris) the following lines:

                 

                http://localhost:4502/content/geometrixx-outdoors/en_US/jcr:content.json

                {

                * "jcr:mixinTypes": ["cq:PollConfig"],

                * "enabled": true,

                * "source": "hybris:outdoors",

                * "jcr:primaryType": "cq:PageContent",

                * "interval": 86400

                }

                 

                However, when using the packages that are used in the example of geometrixx, I don't see the source property or that PollConfig mixin. Not sure if there is something that needs to be configured for that?

                 

                Could anyone explain to me if or how the importer creates pages for the products? If so, is there a way to tell the importer that it needs to create pages with a specific template?

                 

                I feel as if the documentation is really outdated.

                 

                Might there be a newer version of the implementation somewhere that is not being spoken about in the documentation?

                 

                Kind regards

                Dylan