Skip to Content

Duplicate deployment code

Hi all,

For one of our projects we have an issue at this moment. It started as a B2C platform. When they were defining their itemtypes, they also provided the deployments in the items.xml. However, they used deployment typecodes which are used in the B2B extensions.

         <itemtype code="CustomStockLevel" generate="true" autocreate="true">
             <deployment table="CustomStockLevel" typecode="10037"/>
                 <attribute qualifier="productCode" type="java.lang.String">
                     <persistence type="property"/>
                     <modifiers read="true" write="true" optional="false"/>

Until this moment, this wasn't an issue, but now they need to enable the B2B accelerator on the same platform, which means we need to enable several new extensions... When we enable the 'b2bcommerce' extension, we get the following error during the build:

 java.lang.IllegalArgumentException: cannot merge namespace ((customcore)) into ((<merged>)) due to duplicate deployment code '10037' : de.hybris.platform.persistence.customcore_CustomStockLevel::((customcore))::YDeployment[customcore-items.xml:2037(ItemTypeTagListener)]<>de.hybris.platform.persistence.b2bcommerce_B2BQuoteLimit::((b2bcommerce))::YDeployment[b2bcommerce-items.xml:489(ItemTypeTagListener)]

Any idea's how to solve this? Just changing the typecode will not work...

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Oct 13, 2016 at 02:48 PM

    It's a bit of a pain to do. It's a while since I've needed to do it but I remember the process being like this:

    • export all instances of your custom type using impex (script generator helps here, not exporting pk)

    • delete all instances

    • delete the type in the hmc

    • stop the server

    • drop the table directly in the db

    • change the typecode

    • build

    • start server

    • run system update to recreate the type with the new typecode

    • import your previously exported data

    You are correct on your comment about the PK containing the typecode. They are the 15 least significant bits of a pk. Have a look at the pk analyser in the administration console to see how it breaks down. Strangely it seems to label the 16 most significant bits as the typecode but you can see for example that SolrIndexedType has typecode 2207 and the 15 least significant bits are 000100010011111

    I knew I'd written about this before...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 12, 2016 at 11:58 AM

    Indeed, changing the typecode alone is not enough. I think that you might need to migrate the table into a new one, since the table will not be removed in the DB when you change the typecode.

    You might also want to take a look at YDeployment, the tables are mapped to the typecodes there.

    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.