Closed yechanpark closed 1 year ago
Hi there,
Ah yes I think I know why you're facing this issue. As you mentioned how both libraries use identical naming, it looks to be the result of both the Spot and Futures connectors using the com.binance.connector.client.impl.WebsocketClientImpl
class. UMWebsocketClientImpl
, used in your example, is a child of WebsocketClientImpl
. Generally this would be a non-issue but you have brought up an interesting use-case by leveraging both Spot and Futures Java connectors in a single file.
For example there's no getNoopCallback()
or getBaseUrl()
function in the Spot implementation of com.binance.connector.client.impl.WebsocketClientImpl
, however both functions do exist in the Futures implementation of com.binance.connector.client.impl.WebsocketClientImpl
. This explains why it works when you remove the Spot library import.
Thanks for pointing this out. I will devise a fix asap for the next release to solve any future conflicts related to importing both connectors in a single file. Likely it will involve changing com.binance.connector.client
to com.binance.connector.futures-client
or similar which should fix the confusion.
This is handled in the new version 2.0.0. Thank you.
hi. im using libraries both binance-futures-connector-java and binance-connector-java in one spring boot project with kotlin.
when i write following test code,
NoSuchMethodError
has been occured. and success when excluded 'binance-connector-java'.build.gradle.kts
test code
class Test { @Test fun subscribe() {
}