Expand my Community achievements bar.

AEM with Hybris 6.3 documentation not working properly

Avatar

Level 3

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-hybris-thro...

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

10 Replies

Avatar

Level 3

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(SegmentNodeBuilder.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(JcrItemResourceFactory.java:144)

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

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

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

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

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

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

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

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

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

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

at com.day.cq.commons.inherit.HierarchyNodeInheritanceValueMap.getInherited(HierarchyNodeInheritanceValueMap.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:147)

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:467)

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

Avatar

Level 10

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.

Avatar

Level 3

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

Avatar

Level 10

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!

Avatar

Level 1

Hi Dylan,

Which AEM version are you using?

The Hybris connector wasn't updated yet for Hybris 6.3.

That will come only after AEM 6.4 release when we update the connector for AEM 6.4 and latest Hybris.

Regards, Levente

Avatar

Level 3

What does it matter what version of AEM I'm using?

Currently I'm using 6.3.1.2

Avatar

Level 3

Well it's a good thing this wasn't available when I created this topic... I also created another topic to tell them the artifact was missing and requested for an update, but apparently it already happened and nobody cared to notify me about it.