on 10-12-2016 12:30 PM
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"/>
<attributes>
<attribute qualifier="productCode" type="java.lang.String">
<persistence type="property"/>
<modifiers read="true" write="true" optional="false"/>
</attribute>
...
</attributes>
</itemtype>
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...
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... https://wiki.hybris.com/display/forum/Maximum+limit+for+typecodes+in+Hybris?focusedCommentId=2005429...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.