SAP Knowledge Base Article - Preview

2935203 - ClassCastException is thrown during importing data to SAP Commerce via Integration API (OData)

Symptom

When sending data as an array to SAP Commerce via Integration API (odata2webservices extension) following error may be thrown:

{"thread":"hybrisHTTP25","level":"ERROR","loggerName":"de.hybris.platform.odata2services.odata.processor.DefaultODataProcessor","message":"RuntimeException while trying to persist an ODataEntry:","thrown":
{"commonElementCount":0,"localizedMessage":"org.apache.olingo.odata2.core.ep.feed.ODataDeltaFeedImpl cannot be cast to org.apache.olingo.odata2.api.ep.entry.ODataEntry","message":"org.apache.olingo.odata2.core.ep.feed.ODataDeltaFeedImpl cannot be cast to org.apache.olingo.odata2.api.ep.entry.ODataEntry","name":"java.lang.ClassCastException","extendedStackTrace":[
{"class":"de.hybris.platform.odata2services.odata.persistence.lookup.DefaultItemLookupStrategy","method":"buildWhereForKeyNavigationProperty","file":"DefaultItemLookupStrategy.java","line":198,"exact":false,"location":"odata2servicesserver.jar","version":"?"},
{"class":"de.hybris.platform.odata2services.odata.persistence.lookup.DefaultItemLookupStrategy","method":"buildWhereForKeyNavProperties","file":"DefaultItemLookupStrategy.java","line":185,"exact":false,"location":"odata2servicesserver.jar","version":"?"},
{"class":"de.hybris.platform.odata2services.odata.persistence.lookup.DefaultItemLookupStrategy","method":"queryBuilder","file":"DefaultItemLookupStrategy.java","line":143,"exact":false,"location":"odata2servicesserver.jar","version":"?"},
{"class":"de.hybris.platform.odata2services.odata.persistence.lookup.DefaultItemLookupStrategy","method":"lookupInternal","file":"DefaultItemLookupStrategy.java","line":90,"exact":false,"location":"odata2servicesserver.jar","version":"?"},
{"class":"de.hybris.platform.odata2services.odata.persistence.lookup.DefaultItemLookupStrategy","method":"lookup","file":"DefaultItemLookupStrategy.java","line":59,"exact":false,"location":"odata2servicesserver.jar","version":"?"},
{"class":"de.hybris.platform.odata2services.odata.persistence.impl.DefaultModelEntityService","method":"lookup","file":"DefaultModelEntityService.java","line":118,"exact":false,"location":"odata2servicesserver.jar","version":"?"},
{"class":"de.hybris.platform.odata2services.odata.persistence.impl.DefaultModelEntityService","method":"getItem","file":"DefaultModelEntityService.java","line":79,"exact":false,"location":"odata2servicesserver.jar","version":"?"},
{"class":"de.hybris.platform.odata2services.odata.persistence.impl.DefaultModelEntityService","method":"createOrUpdateItem","file":"DefaultModelEntityService.java","line":63,"exact":false,"location":"odata2servicesserver.jar","version":"?"},
{"class":"de.hybris.platform.odata2services.odata.persistence.impl.DefaultPersistenceService","method":"saveEntities","file":"DefaultPersistenceService.java","line":139,"exact":false,"location":"odata2servicesserver.jar","version":"?"},


Read more...

Environment

SAP Commerce

Product

SAP Commerce all versions

Keywords

ClassCastException, OData, EntityPropertyProcessor , KBA , CEC-SCC-INT-IAPI , Integration APIs , 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.