You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use XChange in a Spring Boot 3.1.x project you'll encounter problem with the deserialisation if IOrderFlags. An easy way to reproduce it is to simply upgrade to <version.fasterxml>2.15.2</version.fasterxml> in XChange's parent pom and run the tests.
The first failing tests is: BinanceAdaptersTest.testFilledMarketOrder:21 » MismatchedInput Unexpected token (VALUE_STRING), expected START_OBJECT: need JSON Object to contain As.WRAPPER_OBJECT type information for class org.knowm.xchange.binance.dto.trade.TimeInForce at [Source: (InputStreamReader); line: 11, column: 20] (through reference chain: org.knowm.xchange.binance.dto.trade.BinanceOrder["timeInForce"]) [ERROR] TradeServiceResilienceTest.shouldSucceedIfFirstCallTimeoutedAndRetryIsEnabled:39 » HttpStatusIO Unexpected token (VALUE_STRING), expected START_OBJECT: need JSON Object to contain As.WRAPPER_OBJECT type information for class org.knowm.xchange.binance.dto.trade.TimeInForce at [Source: (String)"[ { "symbol": "LTCBTC", "orderId": 1, "orderListId": -1, "clientOrderId": "myOrder1", "price": "0.1", "origQty": "1.0", "executedQty": "0.0", "cummulativeQuoteQty": "0.0", "status": "NEW", "timeInForce": "GTC", "type": "LIMIT", "side": "BUY", "stopPrice": "0.0", "icebergQty": "0.0", "time": 1499827319559, "updateTime": 1499827319559, "isWorking": true, "origQuoteOrderQty": "0.000000" }]"; line: 1, column: 236] (through reference chain: java.util.ArrayList[0]->org.knowm.xchange.binance.dto.trade.BinanceOrder["timeInForce"])
I couldn't (yet) follow how Jackson is supposed to work in XChange related to type inheritance and didn't find an easy fix for this.
I hope somebody else with deeper knowledge on this might be able to :-)
The text was updated successfully, but these errors were encountered:
rvullriede
changed the title
Incompatibility with Jackson 2.15.x (as used by Spring Boot 3.x)
Incompatibility with Jackson 2.15.x (as used by Spring Boot 3.1.x)
Oct 4, 2023
When you use XChange in a Spring Boot 3.1.x project you'll encounter problem with the deserialisation if IOrderFlags. An easy way to reproduce it is to simply upgrade to <version.fasterxml>2.15.2</version.fasterxml> in XChange's parent pom and run the tests.
The first failing tests is:
BinanceAdaptersTest.testFilledMarketOrder:21 » MismatchedInput Unexpected token (VALUE_STRING), expected START_OBJECT: need JSON Object to contain As.WRAPPER_OBJECT type information for class org.knowm.xchange.binance.dto.trade.TimeInForce at [Source: (InputStreamReader); line: 11, column: 20] (through reference chain: org.knowm.xchange.binance.dto.trade.BinanceOrder["timeInForce"]) [ERROR] TradeServiceResilienceTest.shouldSucceedIfFirstCallTimeoutedAndRetryIsEnabled:39 » HttpStatusIO Unexpected token (VALUE_STRING), expected START_OBJECT: need JSON Object to contain As.WRAPPER_OBJECT type information for class org.knowm.xchange.binance.dto.trade.TimeInForce at [Source: (String)"[ { "symbol": "LTCBTC", "orderId": 1, "orderListId": -1, "clientOrderId": "myOrder1", "price": "0.1", "origQty": "1.0", "executedQty": "0.0", "cummulativeQuoteQty": "0.0", "status": "NEW", "timeInForce": "GTC", "type": "LIMIT", "side": "BUY", "stopPrice": "0.0", "icebergQty": "0.0", "time": 1499827319559, "updateTime": 1499827319559, "isWorking": true, "origQuoteOrderQty": "0.000000" }]"; line: 1, column: 236] (through reference chain: java.util.ArrayList[0]->org.knowm.xchange.binance.dto.trade.BinanceOrder["timeInForce"])
I went through Jackson's changelog and found the following issue which might be related: FasterXML/jackson-databind#2968
I couldn't (yet) follow how Jackson is supposed to work in XChange related to type inheritance and didn't find an easy fix for this.
I hope somebody else with deeper knowledge on this might be able to :-)
The text was updated successfully, but these errors were encountered: