cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Commerce 1811 Integration API error: No attribute with qualifier baseProduct found.

0 Kudos
1,208

I am configuring an INBOUND Web Service to expose an ItemType derived from VariantProduct with the Integration UI Tool / Integration API based on OData in SAP Commerce 18.11 (odata2webservices). I configured the attribute "baseProduct" to be exposed / delivered by the service, e.g.:

     INSERT_UPDATE IntegrationObjectItemAttribute; integrationObjectItem(integrationObject(code), code)[unique = true]; attributeName[unique = true]; attributeDescriptor(enclosingType(code), qualifier); returnIntegrationObjectItem(integrationObject(code), code); unique[default = false]; autoCreate[default = false] 
 
 ...
 ; MYService:MYItemType         ; baseProduct       ; MYItemType:baseProduct       ; MYService:Product           ;     ;  


I expected that I can retrieve Items of this type in a GET request. Actually I get the following error as response:

 <?xml version='1.0' encoding='UTF-8'?>
 <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
     <code>runtime_error</code>
     <message xml:lang="en">There was a problem with the retrieval of the requested [MYItemType].</message>
 </error>

In the log the following exception is written:

 ERROR [hybrisHTTP9] [DefaultODataProcessor] No attribute with qualifier baseProduct found.
 de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException: No attribute with qualifier baseProduct found.
         at de.hybris.platform.servicelayer.type.impl.DefaultTypeService.getAttributeDescriptor(DefaultTypeService.java:201) ~[coreserver.jar:?]
         at de.hybris.platform.odata2services.odata.persistence.populator.processor.AbstractPropertyProcessor.getAttributeDescriptor(AbstractPropertyProcessor.java:120) ~[classes/:?]
         at de.hybris.platform.odata2services.odata.persistence.populator.processor.AbstractPropertyProcessor.readPropertyValue(AbstractPropertyProcessor.java:92) ~[classes/:?]
         at de.hybris.platform.odata2services.odata.persistence.populator.processor.AbstractPropertyProcessor.processEntity(AbstractPropertyProcessor.java:79) ~[classes/:?]
         at de.hybris.platform.odata2services.odata.persistence.populator.DefaultEntityModelPopulator.populateEntity(DefaultEntityModelPopulator.java:54) ~[classes/:?]
         at de.hybris.platform.odata2services.odata.persistence.impl.DefaultModelEntityService.getODataEntry(DefaultModelEntityService.java:95) ~[classes/:?]
         at de.hybris.platform.odata2services.odata.persistence.impl.DefaultPersistenceService.toODataEntry(DefaultPersistenceService.java:121) ~[classes/:?]
         at de.hybris.platform.odata2services.odata.persistence.impl.DefaultPersistenceService.lambda$0(DefaultPersistenceService.java:107) ~[classes/:?]


I also get this error if I expose the ItemType VariantProduct directly to a Web Service and add the attribute baseProduct:

Accepted Solutions (0)

Answers (1)

Answers (1)

Slava
Product and Topic Expert
Product and Topic Expert
0 Kudos

It must a be bug in the IO modeling UI. The generated impex is not valid. The problem is in attributeDescriptor column. It contains value MYItemType:baseProduct but it should be VariantProduct:baseProduct.

attritributeDescriptor refers to an attribute descriptor in the type system and first half of the value is a type in the type system. Of course, MYItemType does not exist in the type system - it's a name (code) of the integration object item; the type system type is called VariantProduct

As possible workaround you could either modify the impex generated in the UI and then import it manually, skipping the UI. Or don't customize the type name for the integration object item and leave it called VariantProduct instead of MYItemType