Symptom
If there is an existing attribute of a Commerce ItemType has persistence type “dynamic” in the items.xml definition. For example:
<itemtypes> <itemtype generate="true" code="MyProduct" jaloclass="org.training.jalo.MyProduct" extends="Product" autocreate="true" > <attributes> <attribute qualifier="testda" type="java.lang.String"> <persistence type="dynamic" attributeHandler="testdaAttributeHandler"/> <modifiers read="true" write="false" search="false" optional="true"/> </attribute> </attributes> </itemtype> </itemtypes> |
If a persisted attribute with the same qualifier is needed due to business requirements and do change its persistence type of the same attribute to “property”:
<itemtype generate="true" code="MyProduct" jaloclass="org.training.jalo.MyProduct" extends="Product" autocreate="true" > <attributes> <attribute qualifier="testda" type="java.lang.String"> <!-- <persistence type="dynamic" attributeHandler="testdaAttributeHandler"/> --> <persistence type="property"/> <!-- <modifiers read="true" write="false" search="false" optional="true"/>--> <modifiers read="true" write="true" search="true" optional="true"/> </attribute> </attributes> </itemtype> |
Then do a build and regular system update ( Data migration mode for a CCV2 deployment), the system update or deployment will fail due to following error:
Target exception: de.hybris.platform.servicelayer.exceptions.SystemException: cannot find spring bean [MyProduct_testdaAttributeHandler] configured for dynamic attribute [MyProduct.testda] from extension …
at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:91) … ... Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'MyProduct_testdaAttributeHandler' available … … shutting down hybris registry..
BUILD FAILED |
Read more...
Environment
- SAP Commerce
- SAP Commerce Cloud
Product
Keywords
KBA , CEC-SCC-PLA-PL , Platform , CEC-SCC-CLA-DEP , Deployments , How To
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.