1

I've installed in my local environment customgigyaaddon (an extended version of gigyaloginaddon), injected in my customstorefront and added to localextensions.xml and compiled without any problems, however, when I try to generate a build of this same version in sap commerce cloud, it throws me the following exception :

/opt/workspace/build/commerce- 
suite/hybris/bin/platform/resources/ant/antmacros.xml:587: 
java.lang.IllegalArgumentException: cannot merge namespace ((customgigyaaddon)) into 
((<merged>)) due to duplicate type code 'gigyaconfig2cmssite' : GigyaConfig2CMSSite:: 
((customgigyaaddon))::YRelation[customgigyaaddon-items.xml:14(RelationTypeTagListener)] 
<>GigyaConfig2CMSSite::((gigyaservices))::YRelation[gigyaservices- 
items.xml:65(RelationTypeTagListener)] 

My localextensions-cloud.xml is exactly the same as my localextensions.xml and in the manifest.json I've declared the addon injection as follows:

{
  "commerceSuiteVersion":"2105",
  "enableImageProcessingService": true,
  "extensionPacks" : [
    {
      "name" : "hybris-commerce-integrations",
      "version" : "2108.2"
    }
  ],
  "extensions":[
    "sapymktcommon",
    "sapymktclickstream",
    "sapymktrecommendation",
    "sapymktrecommendationbuffer",
    "sapymktrecommendationwebservices",
    "cloudmediaconversion",
    "mediaconversionbackoffice",
    "sapymktsegmentation",
    "sapymktsegmentationb2b",
    "sapymktsegmentationwebservices",
    "personalizationymkt",
    "integrationbackoffice",
    "outboundsyncbackoffice",
    "sapymktdatareplication",
    "assistedservicestorefront"
  ],
  "useConfig":{
    "properties":[
      {
        "location":"config/local-dev.properties",
        "persona":"development"
      },
      {
        "location":"config/local-stag.properties",
        "persona":"staging"
      },
      {
        "location":"config/local-prd.properties",
        "persona":"production"
      }
    ],
    "extensions":{
      "location":"/config/localextensions-cloud.xml"
    },
    "solr":{
      "location":"customSolr"
    }
  },
  "storefrontAddons":[
    {
      "addons":["commerceorgsamplesaddon","smarteditaddon","textfieldconfiguratortemplateaddon","customerticketingaddon","orderselfserviceaddon","consignmenttrackingaddon","marketplaceaddon","notificationaddon","customerinterestsaddon","stocknotificationaddon","customaddon","configurablebundleaddon","sapymktrecommendationaddon"],
      "storefronts":["customstorefront"],
      "template":"yacceleratorstorefront"
    },
    {
      "addons":["customgigyaaddon"],
      "storefronts":["customstorefront"],
      "template":"yacceleratorstorefront"
    }
  ],
  "aspects":[
    {
      "name":"backoffice",
      "webapps":[
        {
          "name":"mediaweb",
          "contextPath":"/medias"
        },
        {
          "name":"backoffice",
          "contextPath":"/backoffice"
        },
        {
          "name":"hac",
          "contextPath":"/hac"
        },
        {
          "name":"dathubadapter",
          "contextPath":"/datahubadapter"
        },
        {
          "name":"oauth2",
          "contextPath":"/authorizationserver"
        },
        
        {
          "name": "customstorefront",
          "contextPath": "/valet"
        }
        {
          "name": "personalizationsmartedit",
          "contextPath": "/personalizationsmartedit"
        },
        {
          "name": "personalizationpromotionssmartedit",
          "contextPath": "/personalizationpromotionssmartedit"
        },
        {
          "name": "personalizationwebservices",
          "contextPath": "/personalizationwebservices"
        },
        {
          "name": "personalizationsearchsmartedit",
          "contextPath": "/personalizationsearchsmartedit"
        },
        {
          "name":"previewwebservices",
          "contextPath":"/previewwebservices"
        },
        {
          "name":"permissionswebservices",
          "contextPath":"/permissionswebservices"
        },
        {
          "name":"ycommercewebservices",
          "contextPath":"/rest"
        }
      ]
    } 
      ],
      "webapps":[
        {
          "name":"customstorefront",
          "contextPath":"/custom"
        }
      ]
    },
    {
      "name":"backgroundProcessing",
      "properties":[
        {
          "key":"cluster.node.groups",
          "value":"integration,yHotfolderCandidate"
        }
      ],
      "webapps":[
        {
          "name":"hac",
          "contextPath":"/hac"
        },
        {
          "name":"mediaweb",
          "contextPath":"/medias"
        }
      ]
    }
      ]
    }
  ],
  "properties": [
      {
        "key":"configFile",
        "value":"/opt/hybris/bin/custom/resources/update-config.json"
      }
  ]
}

Looking the exception it looks like there is already an relation gigyaconfig2cmssite declared in gigyaservices-items.xml, however this is not true since this specific relation is only declared in customgigyaservices-items.xml.

Am I missing something? I feel really lost

Nexussim Lements
  • 535
  • 1
  • 15
  • 47
  • just a suggestion , please try to rename relation then do build – Raushan Kumar May 25 '22 at 10:50
  • Same error, diferente typecode: now the duplicate type code is `abstractgigyacomponent` (which is the following entity declared after `gigyaconfig2cmssite` relation in customgigyaaddon-items.xml).Does It seems like gigyaservices-items.xml is copying my customgigyaaddon-items.xml structure??? – Nexussim Lements May 25 '22 at 11:29

1 Answers1

0

if you analyzed the issue as follows:customgigyaaddon-items.xml and gigyaservices-items.xml, both contain the entry.

Otherwise, have you tried to ant clean all the platform? Also, set generate and auto-create as false and removed the extends.