SAP Knowledge Base Article - Preview

3493274 - Problem regarding redeclared attributes with atomic types

Symptom

Problem can appear with storing and reading atomic attributes redeclared like in example below:

...

<itemtype code="MyAbstractItem" abstract="true" autocreate="true" generate="true">

...

<attribute qualifier="value" type="java.lang.Object">

<persistence type="property" />

</attribute>

</attributes>

...

</itemtype>

<itemtype code="MyStringItem" extends="MyAbstractItem">

<attributes>

<attribute qualifier="value" type="java.lang.String" redeclare="true">

<persistence type="property" />

</attribute>

</attributes>

</itemtype>

<itemtype code="MyIntegerItem" extends="MyAbstractItem">

<attributes>

<attribute qualifier="value" type="java.lang.Integer" redeclare="true">

<persistence type="property" />

</attribute>

</attributes>

</itemtype>

...

Problems :

1 : Problem with saving object with redeclared attributes for atomic types.

Error displayed in logs depends on database and redeclared type which is used.

Example errors:

MSSQL:

com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from varbinary to INTEGER is unsupported

com.microsoft.sqlserver.jdbc.SQLServerException: The conversion from varbinary to DOUBLE is unsupported

Oracle:

oracle.jdbc.OracleDatabaseException: ORA-00932: inconsistent datatypes: expected BLOB got NUMBER

java.sql.SQLException: Invalid column type: getString/getNString not implemented for class oracle.jdbc.driver.T4CBlobAccessor

SAP HANA : Exception for Integer: com.sap.db.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot convert Java type

int to SQL type BLOB.

2 : Problem with reading object with redeclared attributes for atomic types.

This case refers to MySql database because it was able to store different values in longblob type column even when column type and attribute

type was inconsistent.

Can appear also for SAP HANA in case of Object->String redeclaration.

CCV2/SQLServer will not encounter this issue.

Error example :

ERROR [hybrisHTTP38] [JDBCValueMappings] could not read serialized value [fieldName=p_value] :

java.io.EOFException

ERROR [hybrisHTTP38] [PropertyJDBC] error reading property field 'value'/'p_value' of item

'8796093080228'/'8796093080228' (info was [value,p_value,class java.lang.Object] )

stack:

ERROR [hybrisHTTP38] [PagingDelegateController] java.io.EOFException

de.hybris.platform.jalo.JaloSystemException: java.io.EOFException

at de.hybris.platform.persistence.property.PropertyJDBC.readPropertyRow(PropertyJDBC.java:777)

...

ERROR [hybrisHTTP2] [JDBCValueMappings] could not read serialized value [fieldName=p_value] : java.

io.StreamCorruptedException: invalid stream header: 61736466

ERROR [hybrisHTTP2] [PropertyJDBC] error reading property field 'value'/'p_value' of item

'8796093080228'/'8796093080228' (info was [value,p_value,class java.lang.Object] )

stack:

ERROR [hybrisHTTP2] [PagingDelegateController] java.io.StreamCorruptedException: invalid stream

header: 61736466

de.hybris.platform.jalo.JaloSystemException: java.io.StreamCorruptedException: invalid stream

header: 61736466

at de.hybris.platform.persistence.property.PropertyJDBC.readPropertyRow(PropertyJDBC.java:777)


Read more...

Environment

  • SAP Commerce 2205
  • SAP Commerce Cloud 2211

Product

SAP Commerce 2205 ; SAP Commerce Cloud 2211

Keywords

KBA , CEC-SCC-PLA-PL , Platform , Problem

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.