crazzyghost / alphavantage-java

Fluent Java wrapper for Alpha Vantage API
MIT License
80 stars 35 forks source link

Exception in thread "main" java.lang.NoSuchMethodError #15

Closed NikolaF94 closed 2 years ago

NikolaF94 commented 3 years ago

Hi, I am trying to use your wrapper, but I keep getting this issue :

Exception in thread "main" java.lang.NoSuchMethodError: kotlin.collections.ArraysKt.copyInto([B[BIII)[B at okio.Segment.writeTo(Segment.kt:164) at okio.Segment.compact(Segment.kt:147) at okio.Buffer.write(Buffer.kt:1854) at okio.Buffer.read(Buffer.kt:1865) at okio.Buffer.writeAll(Buffer.kt:1655) at okio.Options$Companion.buildTrieRecursive(Options.kt:187) at okio.Options$Companion.buildTrieRecursive(Options.kt:174) at okio.Options$Companion.buildTrieRecursive$default(Options.kt:113) at okio.Options$Companion.of(Options.kt:72) at okhttp3.internal.Util.(Util.kt:69) at okhttp3.internal.concurrent.TaskRunner.(TaskRunner.kt:309) at okhttp3.ConnectionPool.(ConnectionPool.kt:41) at okhttp3.ConnectionPool.(ConnectionPool.kt:47) at okhttp3.OkHttpClient$Builder.(OkHttpClient.kt:457) at com.crazzyghost.alphavantage.Config.defaultClient(Config.java:60) at com.crazzyghost.alphavantage.Config.(Config.java:21) at com.crazzyghost.alphavantage.Config.(Config.java:11) at com.crazzyghost.alphavantage.Config$Builder.build(Config.java:103) at com.MasterTweetsAnalysis.SpringBootHelloWorldApplication.init(SpringBootHelloWorldApplication.java:50) at com.MasterTweetsAnalysis.SpringBootHelloWorldApplication.main(SpringBootHelloWorldApplication.java:42)

My main class:

@SpringBootApplication public class SpringBootHelloWorldApplication {

public static void main(String[] args) throws TwitterException{
    Config cfg = Config.builder()
            .key("000keyIsHidden1111")
            .timeOut(10)
            .build();

    AlphaVantage.api().init(cfg);
    AlphaVantage.api()
            .timeSeries()
            .intraday()
            .forSymbol("IBM")
            .interval(Interval.FIVE_MIN)
            .outputSize(OutputSize.FULL)
            .fetch();
    SpringApplication.run(SpringBootHelloWorldApplication.class, args);
}

Thanks for your time and help :)))

crazzyghost commented 2 years ago

@NikolaF94 Sorry I have been busy with some other things. I work on this when I have some spare time. Could you find a solution or is this still an issue?

NikolaF94 commented 2 years ago

@crazzyghost Solved it, thanks for answering.

crazzyghost commented 2 years ago

Oh that's great. Could you help with how you went about solving the issue?