Jda: Completed the setup for Guild without matching id in ReadyHandler cache

Created on 4 Aug 2017  路  8Comments  路  Source: DV8FromTheWorld/JDA

JDA was working great until I initialized it inside of a Spring Boot service (previously I was not using Spring Boot). Now it can login but not connect to my guild.

Log:

[19:07:12] [Info] [JDA]: Login Successful!
[19:07:13] [Info] [JDASocket]: Connected to WebSocket
[19:08:43] [Fatal] [JDASocket]: Completed the setup for Guild: G:My Guild(<Big long number goes here>) without matching id in ReadyHandler cache
[19:08:43] [Fatal] [JDASocket]: Encountered an exception:
[19:08:43] [Fatal] [JDASocket]: java.lang.NullPointerException
    at net.dv8tion.jda.core.handle.ReadyHandler.guildSetupComplete(ReadyHandler.java:193)
    at net.dv8tion.jda.core.handle.GuildCreateHandler.lambda$handleInternally$91(GuildCreateHandler.java:44)
    at net.dv8tion.jda.core.entities.EntityBuilder.createGuildFirstPass(EntityBuilder.java:292)
    at net.dv8tion.jda.core.handle.GuildCreateHandler.handleInternally(GuildCreateHandler.java:38)
    at net.dv8tion.jda.core.handle.SocketHandler.handle(SocketHandler.java:37)
    at net.dv8tion.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:811)
    at net.dv8tion.jda.core.requests.WebSocketClient.onTextMessage(WebSocketClient.java:516)
    at net.dv8tion.jda.core.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:845)
    at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:368)
    at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:270)
    at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:990)
    at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:749)
    at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
    at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
    at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)

Really not sure where to go from here. I tried kicking and re-adding the bot.

Most helpful comment

Try adding (Well imagine I know how to format it.)

```

org.json
json
20160810

All 8 comments

Are you on latest? I'm kinda sure it was fixed on 240

I'm on 3.2.0_241, thanks for the quick reply!

Do you use maven or gradle?
If you're using gradle, add compile group: 'org.json', name: 'json', version: '20160810' to your build.gradle dependencies.

I use maven:

<dependency>
    <groupId>net.dv8tion</groupId>
    <artifactId>JDA</artifactId>
    <version>3.2.0_241</version>
</dependency>

You need to specify the org. json version explicitly

Try adding (Well imagine I know how to format it.)

```

org.json
json
20160810

That worked, thanks both of you! I guess Spring Boot has a conflicting version?

The issue happend alot to maven users so we already knew the solution. However Gradle user are having no problems.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Frederikam picture Frederikam  路  3Comments

istamendil picture istamendil  路  3Comments

MinnDevelopment picture MinnDevelopment  路  5Comments

sachinhasaphatass picture sachinhasaphatass  路  3Comments

StijnSimons picture StijnSimons  路  3Comments