olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jin ZHAO (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OLINGO-1150) Can't read Decimal value which value bigger than 10M from MicrosoftCRM
Date Thu, 14 Sep 2017 09:10:00 GMT

     [ https://issues.apache.org/jira/browse/OLINGO-1150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jin ZHAO updated OLINGO-1150:
-----------------------------
    Labels: easyfix  (was: )

> Can't read Decimal value which value bigger than 10M from MicrosoftCRM
> ----------------------------------------------------------------------
>
>                 Key: OLINGO-1150
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1150
>             Project: Olingo
>          Issue Type: Bug
>    Affects Versions: (Java) V4 4.3.0
>            Reporter: Jin ZHAO
>              Labels: easyfix
>
> {code:java}
> {
>   "@odata.context":"https://talend.api.crm.dynamics.com/api/data/v8.1/$metadata#salesorders(salesorderid,new_talend_test)","#Microsoft.Dynamics.CRM.FulfillSalesOrder":{
>     "title":"FulfillSalesOrder","target":"https://talend.api.crm.dynamics.com/api/data/v8.1/salesorders/Microsoft.Dynamics.CRM.FulfillSalesOrder"
>   },"#Microsoft.Dynamics.CRM.ValidateSharePointFolder":{
>     "title":"ValidateSharePointFolder","target":"https://talend.api.crm.dynamics.com/api/data/v8.1/salesorders/Microsoft.Dynamics.CRM.ValidateSharePointFolder"
>   },"value":[
>     {
>       "@odata.type":"#Microsoft.Dynamics.CRM.salesorder","@odata.id":"https://talend.api.crm.dynamics.com/api/data/v8.1/salesorders(6a5ef029-1b66-e711-8114-e0071b6ad141)","@odata.etag":"W/\"7048734\"","@odata.editLink":"salesorders(6a5ef029-1b66-e711-8114-e0071b6ad141)","salesorderid@odata.type":"#Guid","salesorderid":"6a5ef029-1b66-e711-8114-e0071b6ad141","new_talend_test@odata.type":"#Decimal","new_talend_test":31991163.0000,"_transactioncurrencyid_value@odata.type":"#Guid","_transactioncurrencyid_value":"dca1714c-6d1a-e311-a5fb-b4b52f67b688","transactioncurrencyid@odata.associationLink":"https://talend.api.crm.dynamics.com/api/data/v8.1/salesorders(6a5ef029-1b66-e711-8114-e0071b6ad141)/transactioncurrencyid/$ref","transactioncurrencyid@odata.navigationLink":"https://talend.api.crm.dynamics.com/api/data/v8.1/salesorders(6a5ef029-1b66-e711-8114-e0071b6ad141)/transactioncurrencyid"
>     }
>   ]
> }
> {code}
> We have this kind of response from Microsoft CRM which included this kind of value:
> {code:java}
> "new_talend_test@odata.type":"#Decimal","new_talend_test":31991163.0000
> {code}
> bellow is the error:
> {code:java}
> Exception in component tMicrosoftCrmInput_4 (TestCase_tMicrosoftCRMInput)
> java.lang.IllegalArgumentException: org.apache.olingo.client.api.serialization.ODataDeserializerException:
java.io.IOException: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The literal
'3.1991163E7' has illegal content.
> 	at org.apache.olingo.client.core.communication.request.retrieve.ODataEntitySetRequestImpl$ODataEntitySetResponseImpl.getBody(ODataEntitySetRequestImpl.java:87)
> 	at org.apache.olingo.client.core.communication.request.retrieve.ODataEntitySetRequestImpl$ODataEntitySetResponseImpl.getBody(ODataEntitySetRequestImpl.java:68)
> 	at local_project.testcase_tmicrosoftcrminput_0_1.TestCase_tMicrosoftCRMInput.tMicrosoftCrmInput_4Process(TestCase_tMicrosoftCRMInput.java:743)
> 	at local_project.testcase_tmicrosoftcrminput_0_1.TestCase_tMicrosoftCRMInput.runJobInTOS(TestCase_tMicrosoftCRMInput.java:1140)
> 	at local_project.testcase_tmicrosoftcrminput_0_1.TestCase_tMicrosoftCRMInput.main(TestCase_tMicrosoftCRMInput.java:989)
> Caused by: org.apache.olingo.client.api.serialization.ODataDeserializerException: java.io.IOException:
org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The literal '3.1991163E7' has
illegal content.
> 	at org.apache.olingo.client.core.serialization.JsonDeserializer.toEntitySet(JsonDeserializer.java:402)
> 	at org.apache.olingo.client.core.serialization.ClientODataDeserializerImpl.toEntitySet(ClientODataDeserializerImpl.java:73)
> 	at org.apache.olingo.client.core.communication.request.retrieve.ODataEntitySetRequestImpl$ODataEntitySetResponseImpl.getBody(ODataEntitySetRequestImpl.java:83)
> 	... 4 more
> Caused by: java.io.IOException: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException:
The literal '3.1991163E7' has illegal content.
> 	at org.apache.olingo.client.core.serialization.JsonEntityDeserializer.doDeserialize(JsonEntityDeserializer.java:236)
> 	at org.apache.olingo.client.core.serialization.JsonEntitySetDeserializer.doDeserialize(JsonEntitySetDeserializer.java:100)
> 	at org.apache.olingo.client.core.serialization.JsonDeserializer.toEntitySet(JsonDeserializer.java:400)
> 	... 6 more
> Caused by: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The literal '3.1991163E7'
has illegal content.
> 	at org.apache.olingo.commons.core.edm.primitivetype.EdmDecimal.internalValueOfString(EdmDecimal.java:90)
> 	at org.apache.olingo.commons.core.edm.primitivetype.AbstractPrimitiveType.valueOfString(AbstractPrimitiveType.java:69)
> 	at org.apache.olingo.client.core.serialization.JsonDeserializer.fromPrimitive(JsonDeserializer.java:293)
> 	at org.apache.olingo.client.core.serialization.JsonDeserializer.value(JsonDeserializer.java:385)
> 	at org.apache.olingo.client.core.serialization.JsonDeserializer.populate(JsonDeserializer.java:276)
> 	at org.apache.olingo.client.core.serialization.JsonEntityDeserializer.doDeserialize(JsonEntityDeserializer.java:234)
> 	... 8 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message