discord-jda / JDA

Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Apache License 2.0
4.34k stars 734 forks source link

can not start bot #1894

Closed WcaleNieWolny closed 3 years ago

WcaleNieWolny commented 3 years ago

General Troubleshooting

Bug Report

I am trying to to start a simple bot but it does not work ### Expected Behavior my aplication just did not run a bot ### Code Example or Reproduction Steps ``` class DiscordBot(val token: String) { fun start(){ var jda: JDA = JDABuilder.createDefault(token, emptyList()) .addEventListeners(MessageListener()) .setActivity(Activity.playing("Type /ping")) .build() } ``` } N/A ### Code for JDABuilder or DefaultShardManagerBuilder Used look for code example ### Exception or Error ``` [JDA RateLimit-Worker 1] ERROR net.dv8tion.jda.internal.requests.RateLimiter - Encountered exception trying to execute request java.lang.NoSuchMethodError: 'boolean com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()' at com.fasterxml.jackson.databind.ObjectMapper.(ObjectMapper.java:622) at com.fasterxml.jackson.databind.ObjectMapper.(ObjectMapper.java:531) at net.dv8tion.jda.api.utils.data.DataObject.(DataObject.java:60) at net.dv8tion.jda.api.requests.Response.parseBody(Response.java:204) at net.dv8tion.jda.api.requests.Response.parseBody(Response.java:182) at net.dv8tion.jda.api.requests.Response.get(Response.java:124) at net.dv8tion.jda.api.requests.Response.getObject(Response.java:105) at net.dv8tion.jda.api.utils.SessionControllerAdapter.lambda$getGateway$0(SessionControllerAdapter.java:86) at net.dv8tion.jda.internal.requests.RestActionImpl.handleSuccess(RestActionImpl.java:278) at net.dv8tion.jda.internal.requests.RestActionImpl.handleResponse(RestActionImpl.java:268) at net.dv8tion.jda.api.requests.Request.handleResponse(Request.java:259) at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:237) at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:141) at net.dv8tion.jda.internal.requests.Requester.execute(Requester.java:124) at net.dv8tion.jda.internal.requests.ratelimit.BotRateLimiter$Bucket.run(BotRateLimiter.java:478) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833) ``` N/A My aplication use a lot od dependecy (look below) ``` org.jetbrains.kotlin kotlin-test-junit 1.5.10 test com.github.GeyserMC MCAuthLib master-SNAPSHOT com.google.http-client google-http-client-jackson2 1.23.0 com.google.http-client google-http-client 1.23.0 org.jetbrains.kotlin kotlin-stdlib-jdk8 1.5.10
    <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-reflect</artifactId>
        <version>1.6.0-M1</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>net.dv8tion</groupId>
        <artifactId>JDA</artifactId>
        <version>4.3.0_346</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.32</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.32</version>
    </dependency>
    <dependency>
        <groupId>com.github.Steveice10</groupId>
        <artifactId>MCProtocolLib</artifactId>
        <version>c2985e83ea</version>
    </dependency>
    <dependency>
        <groupId>net.dzikoysk</groupId>
        <artifactId>cdn</artifactId>
        <version>1.11.6</version>
    </dependency>
    <dependency>
        <groupId>net.dzikoysk</groupId>
        <artifactId>cdn-kt</artifactId>
        <version>1.11.6</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/net.kyori/text-serializer-plain -->
    <dependency>
        <groupId>net.kyori</groupId>
        <artifactId>adventure-text-serializer-plain</artifactId>
        <version>4.9.3</version>
    </dependency>
    <dependency>
        <groupId>net.kyori</groupId>
        <artifactId>adventure-text-serializer-legacy</artifactId>
        <version>4.9.3</version>
    </dependency>
    <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-reflect</artifactId>
    </dependency>
</dependencies>
WcaleNieWolny commented 3 years ago

Fixed: Thanks for ppl from your discord that fixed the issue