'Orika data mapping error after installing cmsoccaddon on custom commercewebservices on Hybris 2005

We are using the custom commercewebservice extended from ycommercewebservice. We are not using the CMS API as of now but we have we need CMS APIs for spartacus.

I have install cmsoccaddon on our customer webservice extension. Addon install successfully but when we try to access https://localhost:9002/rest/v2/{base_site}/cms/pages it will throws the error:

ma.glasnost.orika.MappingException: While attempting the following mapping: sourceType = de.hybris.platform.cmsfacades.data.PageContentSlotData sourceProperty = slotShared(boolean) destinationType = java.util.ArrayList<ContentSlotWsDTO> destinationProperty = 8(ContentSlotWsDTO) Error occurred: ma.glasnost.orika.MappingException: Encountered mapping of primitive to object (or vise-versa); sourceType=boolean, destinationType=ContentSlotWsDTO

Fetch component API is working fine with the cmsaddon (https://localhost:9002/rest/v2/{base_site}/cms/components?fields=DEFAULT&componentIds={componentId})

We Just update hybris version to 2005



Solution 1:[1]

Since you migrated from 1905 to 2005, the endpoints prefix has been changed from /rest/v2/ to /occ/v2.

More information can be found in the following:

help.sap (2005) https://help.sap.com/docs/SAP_COMMERCE/e5d7cec9064f453b84235dc582b886da/d46d19516961438f8939718e87ed787b.html?version=2005 https://help.sap.com/docs/SAP_COMMERCE/9d346683b0084da2938be8a285c0c27a/9136088a207c4fc1bb5ec2b53c462b23.html?version=2005

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BrianGJ