Skip to Content
0
Former Member
Jan 14, 2017 at 02:10 PM

how to insert more than 255 byte to hsql

499 Views

I'm using hybris 5.7 and hsql. When I try to save data of more then 255 bytes on a custom field I'm getting error:

INFO | jvm 1 | main | 2017/01/12 16:02:17.206 | de.hybris.platform.servicelayer.exceptions.ModelSavingException: org.springframework.dao.DataIntegrityViolationException: query; SQL []; data exception: string data, right truncation; nested exception is java.sql.SQLDataException: data exception: string data, right truncation INFO | jvm 1 | main | 2017/01/12 16:02:17.214 | at de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.storeAttributes(ItemModelConverter.java:1524) INFO | jvm 1 | main | 2017/01/12 16:02:17.215 | at de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.save(ItemModelConverter.java:732) INFO | jvm 1 | main | 2017/01/12 16:02:17.215 | at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.save(ModelWrapper.java:336) INFO | jvm 1 | main | 2017/01/12 16:02:17.215 | at de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.saveOthers(ResolvingModelPersister.java:71) INFO | jvm 1 | main | 2017/01/12 16:02:17.215 | at de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.persist(ResolvingModelPersister.java:56) INFO | jvm 1 | main | 2017/01/12 16:02:17.215 | at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveViaJalo(DefaultModelService.java:1059) INFO | jvm 1 | main | 2017/01/12 16:02:17.215 | at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.doJaloPersistence(DefaultModelService.java:648) INFO | jvm 1 | main | 2017/01/12 16:02:17.215 | at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.persistWrappers(DefaultModelService.java:1002) INFO | jvm 1 | main | 2017/01/12 16:02:17.215 | at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.performPersistenceOperations(DefaultModelService.java:626) INFO | jvm 1 | main | 2017/01/12 16:02:17.215 | at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAllInternal(DefaultModelService.java:620) INFO | jvm 1 | main | 2017/01/12 16:02:17.216 | at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAll(DefaultModelService.java:600) INFO | jvm 1 | main | 2017/01/12 16:02:17.216 | at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.save(DefaultModelService.java:548)

INFO | jvm 1 | main | 2017/01/12 16:02:17.217 | Caused by: de.hybris.platform.persistence.hjmp.HJMPException: org.springframework.dao.DataIntegrityViolationException: query; SQL []; data exception: string data, right truncation; nested exception is java.sql.SQLDataException: data exception: string data, right truncation

The field definition is (extend product datatype) :

              <persistence type="property" >
                  <columntype database="oracle">
                     <value>CLOB</value>
                  </columntype>
                  <columntype database="db2">
                     <value>CLOB</value>
                  </columntype>
                  <columntype database="mysql">
                     <value>text</value>
                  </columntype>
                  <columntype database="sqlserver">
                     <value>text</value>
                  </columntype>
                  <columntype database="hsql">
                     <value>CLOB</value>
                  </columntype>
                  <columntype>
                     <value>varchar</value>
                  </columntype>   
              </persistence>
              <modifiers optional="true" />
              <description>product Country Info</description>
              
 

Also LONGVARCHAR didn't help