Dynmap Dependency Issue #9

Closed
opened 2021-07-11 15:52:51 +00:00 by ZeroHD · 0 comments
ZeroHD commented 2021-07-11 15:52:51 +00:00 (Migrated from git.canopymc.net)

On boot, we are getting this error to console

[14:59:44] [Server thread/ERROR]: Error occurred while enabling QoL v1.11 (Is it up to date?)
java.lang.ClassCastException: class org.dynmap.bukkit.DynmapPlugin cannot be cast to class org.dynmap.DynmapAPI (org.dynmap.bukkit.DynmapPlugin is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @717308c1; org.dynmap.DynmapAPI is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @6ce7b642)
        at xyz.etztech.qol.QoL.onEnable(QoL.java:67) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.17.1.jar:git-Tuinity-18]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.1.jar:git-Tuinity-18]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.1.jar:git-Tuinity-18]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:518) ~[patched_1.17.1.jar:git-Tuinity-18]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:432) ~[patched_1.17.1.jar:git-Tuinity-18]
        at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:710) ~[patched_1.17.1.jar:git-Tuinity-18]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:307) ~[patched_1.17.1.jar:git-Tuinity-18]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1197) ~[patched_1.17.1.jar:git-Tuinity-18]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[patched_1.17.1.jar:git-Tuinity-18]
        at java.lang.Thread.run(Thread.java:831) [?:?]

According to the PaperMC Discord, it has something to do with the dynmap class files be included in the QoL jar. To fix it, we just have to mark the dynmap dependecy in pom.xml as provided:

<dependency>
    <groupId>us.dynmap</groupId>
    <artifactId>dynmap-api</artifactId>
    <version>1.9.4</version>
    <scope>provided</scope>
</dependency>
On boot, we are getting this error to console ``` [14:59:44] [Server thread/ERROR]: Error occurred while enabling QoL v1.11 (Is it up to date?) java.lang.ClassCastException: class org.dynmap.bukkit.DynmapPlugin cannot be cast to class org.dynmap.DynmapAPI (org.dynmap.bukkit.DynmapPlugin is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @717308c1; org.dynmap.DynmapAPI is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @6ce7b642) at xyz.etztech.qol.QoL.onEnable(QoL.java:67) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.17.1.jar:git-Tuinity-18] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.1.jar:git-Tuinity-18] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.1.jar:git-Tuinity-18] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:518) ~[patched_1.17.1.jar:git-Tuinity-18] at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:432) ~[patched_1.17.1.jar:git-Tuinity-18] at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:710) ~[patched_1.17.1.jar:git-Tuinity-18] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:307) ~[patched_1.17.1.jar:git-Tuinity-18] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1197) ~[patched_1.17.1.jar:git-Tuinity-18] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[patched_1.17.1.jar:git-Tuinity-18] at java.lang.Thread.run(Thread.java:831) [?:?] ``` According to the PaperMC Discord, it has something to do with the dynmap class files be included in the QoL jar. To fix it, we just have to mark the dynmap dependecy in [pom.xml](pom.xml) as `provided`: ``` <dependency> <groupId>us.dynmap</groupId> <artifactId>dynmap-api</artifactId> <version>1.9.4</version> <scope>provided</scope> </dependency> ```
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
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: Minecraft/QoL#9
There is no content yet.