SAP Knowledge Base Article - Preview

3665287 - NullPointerException in OData V4 Receiver When Parsing Empty Advertised Actions/Functions

Symptom

OData V4 Receiver fails to parse the response from a target service that sends empty advertise available actions and functions that are bound to a particular entity collection or entity within a payload.

Error:

java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.asText()" because the return value of "com.fasterxml.jackson.databind.node.ObjectNode.get(String)" is null
    at org.apache.olingo.client.core.serialization.JsonEntityDeserializer.doDeserialize(JsonEntityDeserializer.java:192)
    at org.apache.olingo.client.core.serialization.JsonDeserializer.toEntity(JsonDeserializer.java:429)
    at org.apache.olingo.client.core.serialization.ClientODataDeserializerImpl.toEntity(ClientODataDeserializerImpl.java:96)
    at org.apache.olingo.client.core.communication.request.cud.ODataEntityCreateRequestImpl$ODataEntityCreateResponseImpl.getBody(ODataEntityCreateRequestImpl.java:113)
    at com.sap.gw.core.ip.converter.ODataResponseConverterV4.convertEntityToMap(ODataResponseConverterV4.java:256)

Sample Response:

{
  "@context": ...,
  "CustomerID": "ALFKI",
  "CompanyName": "Alfreds Futterkiste",
  "#SampleEntities.MostRecentOrder": {},
  ...
}


Read more...

Environment

  • Cloud Integration
  • SAP Integration Suite

Product

Cloud Integration all versions ; SAP Integration Suite all versions

Keywords

odata, iflow, cpi, Cloud Integration, deploy, error, olingo, NullPointerException, com.fasterxml.jackson.databind.JsonNode.asText(), ODataResponseConverterV , KBA , LOD-HCI-PI-CON-OD , OData Adapters , 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.