Skip to Content

Duplicate definition of attribute

Hi,

I have an attribute named paymentType, that is being used for a B2C custom facade. I have added b2b extensions such as:

b2bacceleratorfacades b2bacceleratoraddon

and uses paymentType attribute too.

Now I have a definition error due b2bacceleratorfacades and renaultfacades:

[ycodegenerator] 25181 [main] ERROR de.hybris.bootstrap.beangenerator.BeanGenera tor - Duplicate definition of attribute (de.hybris.platform.commercefacades.ord er.data.CartData#paymentType) in <renaultfacades> it has been already defined i n <b2bacceleratorfacades>. Problem found during processing the file D:\Public\hy bris\hybris\bin\custom\renault\renaultfacades\resources\renaultfacades-beans.xml for extension <renaultfacades> [ycodegenerator] BUILD FAILED D:\Public\hybris\hybris\bin\platform\build.xml:20: The following error occurred while executing this line: D:\Public\hybris\hybris\bin\platform\resources\ant\compiling.xml:88: The followi ng error occurred while executing this line: D:\Public\hybris\hybris\bin\platform\resources\ant\antmacros.xml:795: The follow ing error occurred while executing this line: D:\Public\hybris\hybris\bin\platform\resources\ant\antmacros.xml:798: de.hybris. bootstrap.beangenerator.BeanGenerationException: Duplicate definition of attribu te (de.hybris.platform.commercefacades.order.data.CartData#paymentType) in <ren aultfacades> it has been already defined in <b2bacceleratorfacades>

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Aug 15, 2019 at 03:37 AM

    Is the paymentType attribute custom? If so, you can't create another attribute that already exists in its super-Types. You can redeclare it, if that's what you wanted to do. But if you really meant to create a new attribute, then you need to use a different name/qualifier.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Geff, thanks for your fast response.

      I redeclared it in the custom-items.xml but then I got this error in custom-beans.xml:

      Duplicate definition of attribute (de.hybris.platform.commercefacades.ord er.data.CartData#paymentType) in <renaultfacades> it has been already defined i n <b2bacceleratorfacades>. Problem found during processing the file D:\Public\hy bris\hybris\bin\custom\renault\renaultfacades\resources\renaultfacades-beans.xml for extension <renaultfacades> [ycodegenerator] BUILD FAILED

  • Posted on Jul 20, 2020 at 12:12 AM

    Hi...how did you solve this problem...? Were you able to find the solution.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.