knowm / XChange

XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
http://knowm.org/open-source/xchange/
MIT License
3.85k stars 1.94k forks source link

[Kucoin] NoSuchMethod error on Kucoin SDK #2977

Closed trixprod closed 5 years ago

trixprod commented 5 years ago

java.lang.NoSuchMethodError: okhttp3.HttpUrl.get(Ljava/lang/String;)Lokhttp3/HttpUrl; at retrofit2.Retrofit$Builder.baseUrl(Retrofit.java:458) at com.kucoin.sdk.factory.RetrofitFactory.getPublicRetorfit(RetrofitFactory.java:33) at com.kucoin.sdk.rest.impl.retrofit.PublicRetrofitAPIImpl.getAPIImpl(PublicRetrofitAPIImpl.java:28) at com.kucoin.sdk.rest.adapter.SymbolAPIAdaptor.getSymbols(SymbolAPIAdaptor.java:27) at org.knowm.xchange.kucoin.KucoinMarketDataServiceRaw.lambda$getKucoinSymbols$2(KucoinMarketDataServiceRaw.java:31) at org.knowm.xchange.kucoin.KucoinExceptionClassifier.classifyingExceptions(KucoinExceptionClassifier.java:17) at org.knowm.xchange.kucoin.KucoinMarketDataServiceRaw.getKucoinSymbols(KucoinMarketDataServiceRaw.java:31) at org.knowm.xchange.kucoin.KucoinExchange.remoteInit(KucoinExchange.java:72) at org.knowm.xchange.BaseExchange.applySpecification(BaseExchange.java:115) at org.knowm.xchange.kucoin.KucoinExchange.applySpecification(KucoinExchange.java:39)

badgerwithagun commented 5 years ago

Hmm, strange. I'll try to replicate this.

badgerwithagun commented 5 years ago

I need to remove the dependence on the external SDK anyway.

I am currently working on this, and should be able to remove the SDK dependency soon.

Progress:

Now testing and will raise PR shortly

badgerwithagun commented 5 years ago

@trixprod, I just did the following:

Everything worked fine.

Can you post some code that causes this error?

badgerwithagun commented 5 years ago

Could you also check which version of okhttp3 you have on your classpath?

trixprod commented 5 years ago

I will try with the SDKless version and update the ticker status in few days.

trixprod commented 5 years ago

Could you also check which version of okhttp3 you have on your classpath?

My okhttp3 version is 3.8.1