You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by Akhil Sai <ak...@gmail.com> on 2019/05/28 12:24:53 UTC
Regarding Double type parsing by OLingo client
Hi All,
I am currently using Apache Olingo to generate and host my OData feed. I am
also using Olingo's Odata-v4 client to consume the same OData feed.
Olingo's client throws this error when I try to consume an OData feed with
more than 17 precision points after 0, for an EDM.Double edm type. For
example, I am consuming a feed with 0.014666666666666666 as one of the
values.
org.apache.olingo.client.api.serialization.ODataDeserializerException:
java.io.IOException:
org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The literal
'0.014666666666666666' has illegal content.
at
org.apache.olingo.client.core.serialization.JsonDeserializer.toEntity(JsonDeserializer.java:424)
~[odata-client-core-4.5.0.jar!/:na]
at
org.apache.olingo.client.core.serialization.ClientODataDeserializerImpl.toEntity(ClientODataDeserializerImpl.java:95)
~[odata-client-core-4.5.0.jar!/:na]
at
org.apache.olingo.client.api.domain.ClientEntitySetIterator.nextJSONEntityFromEntitySet(ClientEntitySetIterator.java:209)
[odata-client-api-4.5.0.jar!/:na]
at
org.apache.olingo.client.api.domain.ClientEntitySetIterator.hasNext(ClientEntitySetIterator.java:114)
[odata-client-api-4.5.0.jar!/:na]
at java.util.Iterator.forEachRemaining(Iterator.java:115)
[na:1.8.0_151]
Can I get an explanation for this? I am struck with this error from a week
and cannot figure out a reason why this is happening.
Any direction would be appreciated.
Thank you,
--
Regards,
B Akhil Sai,
Senior Engineer,
Open Insights LLP,
Pune - 411045
Phone - +919003119544