irufus / gdax-java

Java based wrapper for Coinbase Pro (Formerly known as GDAX API and Coinbase Exchange API)
MIT License
177 stars 131 forks source link

Error while extracting response for type [class [Lcom.coinbase.exchange.model.Product;] ... max_market_funds #86

Open viktor opened 3 years ago

viktor commented 3 years ago

Error with this mapping. Am planning to change the field type hopefully that solves the issue.

org.springframework.web.client.RestClientException: Error while extracting response for type [class [Lcom.coinbase.exchange.model.Product;] and content type [application/json;charset=utf-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize value of type java.lang.Integer from String "2.0": not a valid Integer value; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type java.lang.Integer from String "2.0": not a valid Integer value at [Source: (PushbackInputStream); line: 1, column: 2523] (through reference chain: java.lang.Object[][6]->com.coinbase.exchange.model.Product["max_market_funds"])

at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:117)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:994)
at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:977)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:737)
viktor commented 3 years ago

Changed the field to BigDecimal, is fixed.