Mod throws error on startup #14

Closed
opened 2022-11-20 01:01:42 +00:00 by ChristopherHaws · 12 comments
ChristopherHaws commented 2022-11-20 01:01:42 +00:00 (Migrated from github.com)

Version information

autowhitelist-1.1.2

Expected Behavior

The mod should load when starting my fabric server

Actual Behavior

I receive the following error and the bot never comes online.

[16:52:38] [AutoWhitelist Bot/ERROR]: Caught previously unhandled exception :
[16:52:38] [AutoWhitelist Bot/ERROR]: AutoWhitelist Bot
java.lang.NoClassDefFoundError: net/dv8tion/jda/api/events/ShutdownEvent
        at Not Enough Crashes deobfuscated stack trace.(1.19.2+build.28) ~[?:?]
        at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[?:?]
        at java.lang.Class.getDeclaredMethods(Unknown Source) ~[?:?]
        at net.dv8tion.jda.api.hooks.AnnotatedEventManager.updateMethods(AnnotatedEventManager.java:119) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?]
        at net.dv8tion.jda.api.hooks.AnnotatedEventManager.register(AnnotatedEventManager.java:62) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?]
        at net.dv8tion.jda.internal.hooks.EventManagerProxy.register(EventManagerProxy.java:53) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?]
        at net.dv8tion.jda.internal.JDAImpl.addEventListener(JDAImpl.java:897) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?]
        at net.dv8tion.jda.api.JDABuilder.lambda$build$0(JDABuilder.java:1795) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?]
        at java.lang.Iterable.forEach(Unknown Source) ~[?:?]
        at net.dv8tion.jda.api.JDABuilder.build(JDABuilder.java:1795) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?]
        at com.awakenedredstone.autowhitelist.discord.Bot.run(Bot.java:115) ~[autowhitelist-1.1.2.jar:?]
Caused by: java.lang.ClassNotFoundException: net.dv8tion.jda.api.events.ShutdownEvent
        at jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) ~[?:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
        at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:226) ~[fabric-loader-0.14.10.jar:?]
        at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) ~[fabric-loader-0.14.10.jar:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
        ... 11 more

Reproduction Steps

  1. Put the mod in the mod folder
  2. Follow the instructions from modrinth to setup the server

Java version

Java 17

Additional information

The bot never comes online in discord. When I try to reload the bot, I get the following error:
image

### Version information autowhitelist-1.1.2 ### Expected Behavior The mod should load when starting my fabric server ### Actual Behavior I receive the following error and the bot never comes online. ``` [16:52:38] [AutoWhitelist Bot/ERROR]: Caught previously unhandled exception : [16:52:38] [AutoWhitelist Bot/ERROR]: AutoWhitelist Bot java.lang.NoClassDefFoundError: net/dv8tion/jda/api/events/ShutdownEvent at Not Enough Crashes deobfuscated stack trace.(1.19.2+build.28) ~[?:?] at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?] at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[?:?] at java.lang.Class.getDeclaredMethods(Unknown Source) ~[?:?] at net.dv8tion.jda.api.hooks.AnnotatedEventManager.updateMethods(AnnotatedEventManager.java:119) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?] at net.dv8tion.jda.api.hooks.AnnotatedEventManager.register(AnnotatedEventManager.java:62) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?] at net.dv8tion.jda.internal.hooks.EventManagerProxy.register(EventManagerProxy.java:53) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?] at net.dv8tion.jda.internal.JDAImpl.addEventListener(JDAImpl.java:897) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?] at net.dv8tion.jda.api.JDABuilder.lambda$build$0(JDABuilder.java:1795) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?] at java.lang.Iterable.forEach(Unknown Source) ~[?:?] at net.dv8tion.jda.api.JDABuilder.build(JDABuilder.java:1795) ~[net_dv8tion_jda-5.0.0-alpha.22-c0b6deef1451944a.jar:?] at com.awakenedredstone.autowhitelist.discord.Bot.run(Bot.java:115) ~[autowhitelist-1.1.2.jar:?] Caused by: java.lang.ClassNotFoundException: net.dv8tion.jda.api.events.ShutdownEvent at jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) ~[?:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:226) ~[fabric-loader-0.14.10.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) ~[fabric-loader-0.14.10.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?] ... 11 more ``` ### Reproduction Steps 1. Put the mod in the mod folder 2. Follow the instructions from modrinth to setup the server ### Java version Java 17 ### Additional information The bot never comes online in discord. When I try to reload the bot, I get the following error: ![image](https://user-images.githubusercontent.com/5934505/202877801-b96087d6-e186-4409-863c-00afa7a1afde.png)
Awakened-Redstone commented 2022-11-20 03:56:40 +00:00 (Migrated from github.com)

Do you have any other mods on the server?
As far as I can see this seems to use another version of the library I'm using, this might be a mod conflict
I recommend trying https://github.com/Awakened-Redstone/AutoWhitelist/releases/tag/1.1.2-compat-dcintegration.2.4.7

Do you have any other mods on the server? As far as I can see this seems to use another version of the library I'm using, this might be a mod conflict I recommend trying https://github.com/Awakened-Redstone/AutoWhitelist/releases/tag/1.1.2-compat-dcintegration.2.4.7
ChristopherHaws commented 2022-11-20 20:14:28 +00:00 (Migrated from github.com)

I tried switching to the compat version and I still run into the same issue. I do have quite a few mods installed. You can find a list of all the mods here: https://github.com/ChristopherHaws/mc-craftersmc-modpack/tree/1.19/dev/mods

I tried switching to the compat version and I still run into the same issue. I do have quite a few mods installed. You can find a list of all the mods here: https://github.com/ChristopherHaws/mc-craftersmc-modpack/tree/1.19/dev/mods
Awakened-Redstone commented 2022-11-20 20:23:20 +00:00 (Migrated from github.com)

Can you try removing Not Enough Crashes, it is known to sometimes hide the real crash
I'll look more into the issue when I have the time, it is weird that that is happening since the compat version and the simple-discord-link-bot-forge-fabric-spigot is 1 build apart, with the compat being 22 and the integration mod you are using being 21

Can you try removing Not Enough Crashes, it is known to sometimes hide the real crash I'll look more into the issue when I have the time, it is weird that that is happening since the compat version and the `simple-discord-link-bot-forge-fabric-spigot` is 1 build apart, with the compat being 22 and the integration mod you are using being 21
Awakened-Redstone commented 2022-11-21 17:14:21 +00:00 (Migrated from github.com)

To make sure if it is the discord link mod, can you try to load the server without simple discord link

To make sure if it is the discord link mod, can you try to load the server without `simple discord link`
ChristopherHaws commented 2022-11-21 20:51:07 +00:00 (Migrated from github.com)

I just added simple discord link yesterday since I couldnt get this mod to work. It wasn't installed when this mod was failing to start. I can try removing NEC tonight and see if the error looks different.

I just added simple discord link yesterday since I couldnt get this mod to work. It wasn't installed when this mod was failing to start. I can try removing NEC tonight and see if the error looks different.
Awakened-Redstone commented 2022-11-21 20:52:41 +00:00 (Migrated from github.com)

Ok, I'll review the jar, I might have missed something when building it

Ok, I'll review the jar, I might have missed something when building it
Awakened-Redstone commented 2022-11-21 20:54:30 +00:00 (Migrated from github.com)

Do you mind sharing the full logs

Do you mind sharing the full logs
ChristopherHaws commented 2022-11-22 06:33:28 +00:00 (Migrated from github.com)

Here is a full log:
https://mclo.gs/pAaxTVW

Here is a full log: https://mclo.gs/pAaxTVW
Awakened-Redstone commented 2022-11-22 13:33:32 +00:00 (Migrated from github.com)

Oh, I haven't noticed that the compat version uses an older version of JDA beta
I'll be publishing another compat soon

Oh, I haven't noticed that the compat version uses an older version of JDA beta I'll be publishing another compat soon
Awakened-Redstone commented 2022-11-22 13:49:26 +00:00 (Migrated from github.com)
Published a compat version https://github.com/Awakened-Redstone/AutoWhitelist/releases
ChristopherHaws commented 2022-11-22 22:21:12 +00:00 (Migrated from github.com)

Awesome! Thanks. I will give it a try after work today :)

Awesome! Thanks. I will give it a try after work today :)
Awakened-Redstone commented 2022-11-25 23:33:05 +00:00 (Migrated from github.com)

Just so I know if I can close the issue, has it worked, or you didn't have time to test yet?

Just so I know if I can close the issue, has it worked, or you didn't have time to test yet?
Commenting is not possible because the repository is archived.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LunaFox/AutoWhitelist#14
No description provided.