on 2018 Jun 13 12:02 PM
Hi,
I have created an attribute in a component type which is extending SimpleCMSComponent. As it can contain very large data i defined it as below:
en<attribute qualifier="description" type="localized:java.lang.String">
<description>Description of purchase policy topic</description>
<modifiers read="true" write="true" search="true"
optional="true" />
<persistence type="property">
<columntype database="oracle">
<value>CLOB</value>
</columntype>
<columntype database="sap">
<value>NCLOB</value>
</columntype>
<columntype>
<value>HYBRIS.LONG_STRING</value>
</columntype>
</persistence>
</attribute>
In local I am using HSQL and in environment it will be SAP HANA. Similarly, I did this for another attribute "shortDescription" in item type Product.
Issue is that, the large content is getting save in attribute shortDescription of Product but it is given error when I am trying to save it in Component's attribute. Please let me know what am I doing wrong.
Error is:
INFO | jvm 1 | main | 2018/06/13 12:10:57.211 | Caused by: de.hybris.platform.servicelayer.exceptions.ModelSavingException: sql error saving EJBPropertyRowCache[itemPK:null,langPK:8796093055008,inDB:true,hasChanged:true,names:[description, title],values:[<p>We know this isn't the most interesting page of the Site, but these terms and policies are important and affect your legal rights. <span>PLEASE READ CAREFULLY.</span> </p> <p>The Terms of Use and Purchase Policy make up a legal Agreement between you (you or your) and Edgewell Personal Care Company and/or its affiliates (Edgewell, we, our, or us).</p>, Terms of use],changeList:{0}]:2053908843 for item 8796160525372 , query = UPDATE cmscomponentlp SET p_description = ? ,ITEMTYPEPK = ? WHERE ITEMPK = ? AND LANGPK = ? values = [<p>We know this isn't the most interesting page of the Site, but these terms and policies are important and affect your legal rights. <span>PLEASE READ CAREFULLY.</span> </p> <p>The Terms of Use and Purchase Policy make up a legal Agreement between you (you or your) and Edgewell Personal Care Company and/or its affiliates (Edgewell, we, our, or us).</p>, 8796140666962, 8796160525372, 8796093055008]java.sql.SQLDataException: data exception: string data, right truncation
Thanks.
Request clarification before answering.
Please take into account that "system update" does not check/alter column length limits and does not convert between different text-type columns (e.g. no conversion from varchar(255) to text) - you have to do that directly in the database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arvids,
Thanks for the reply. Can you please tell me if initially I have defined attribute with type as "localized:java.lang.String" and "". Later on if I want to give column length like:
<columntype database="sap">
<value>nvarchar(4000)</value>
</columntype>
<columntype>
<value>HYBRIS.LONG_STRING</value>
</columntype>
and do system update then will it take size into account for same attribute?
Thanks Manish
Hi,
It is still not fixed 😞
In SAP HANA DB, I am getting value is too long for attribute. With same db configuration given in -items.xml one attribute is accepting the long value but attribute in component is giving error.
Any help.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It got fixed after initialization. Earlier I created attribute as String type only that is why new changes were not reflecting. If initialization is not possible then create new attribute.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 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.