MiraculixxT / bluemap-marker

BlueMap addtion plugin. Add a marker command to the game to easily setup your markers ingame without touching configs
MIT License
15 stars 7 forks source link

Compiled with a newer version of Java #34

Closed RosivDamotil closed 3 months ago

RosivDamotil commented 3 months ago

Hi,

version 2.1.2 has been compiled with a wrong java version, so it leads to a crash at startup.

[12:04:26] [main/ERROR]: Minecraft has crashed! net.fabricmc.loader.impl.FormattedException: java.lang.UnsupportedClassVersionError: com/mojang/brigadier/exceptions/CommandSyntaxException has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 63.0 at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:63) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:472) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) ~[fabric-loader-0.15.11.jar:?] Caused by: java.lang.UnsupportedClassVersionError: com/mojang/brigadier/exceptions/CommandSyntaxException has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 63.0 at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] at java.lang.ClassLoader.defineClass(Unknown Source) ~[?:?] at java.security.SecureClassLoader.defineClass(Unknown Source) ~[?:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.15.11.jar:?] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?] at net.minecraft.class_155.(class_155.java:265) ~[server-intermediary.jar:?] at net.minecraft.server.Main.main(Main.java:67) ~[server-intermediary.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.11.jar:?]

When disabling BMM it works like a charm.

MiraculixxT commented 3 months ago

It is not compiled against the wrong Java Version, Minecraft bumped it to Java 21 itself. So please Update your server to Java 21

RosivDamotil commented 3 months ago

No, 1.20.4 stayed. So never mind, I leave it disabled. Just wanted to tell you, that 1.20.4 is still 17 as far as I know.

MiraculixxT commented 3 months ago

Yes but its also build for 1.20.5+ as all my plugins. There is absolutly no reason to stay on an outdated version of Java, the server can be started on any Version above 17. If you want to stay on an outdated Java Version, you need to use an outdated BMM version too.

RosivDamotil commented 3 months ago

As I rented the server I won't but I can live without markers, so it's ok.

Fauli1221 commented 3 months ago

Yes but its also build for 1.20.5+ as all my plugins. There is absolutly no reason to stay on an outdated version of Java, the server can be started on any Version above 17. If you want to stay on an outdated Java Version, you need to use an outdated BMM version too.

I'm on 1.20.4 fabric and a lot of mods I am using are incompatible with java 21 as of now and I can not update to a newer version as not all mods I need have been updated past 1.20.4 so my only option now is to remove this mod really disapointing

MiraculixxT commented 3 months ago

The fabric 1.20.4 version is compiled against Java 17, because it was the latest used version at this point in time. Also in the way how Java works, updating the java version should not break the program (or mod here). Only mods that missusing features or doing stuff that are unsupported will break.

If updating the java version breaks a mod, consider an alternative or reach out to the devs if its important to you. This is in general a bug then

Fauli1221 commented 3 months ago

The fabric 1.20.4 version is compiled against Java 17, because it was the latest used version at this point in time. Also in the way how Java works, updating the java version should not break the program (or mod here). Only mods that missusing features or doing stuff that are unsupported will break.

If updating the java version breaks a mod, consider an alternative or reach out to the devs if its important to you. This is in general a bug then

thanks for the reply

this is the error I get but only when the mod is enabled

[10:31:08] [main/ERROR]: Minecraft has crashed!
net.fabricmc.loader.impl.FormattedException: java.lang.UnsupportedClassVersionError: com/mojang/brigadier/exceptions/CommandSyntaxException has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
    at net.fabricmc.loader.impl.FormattedException.ofLocalized(FormattedException.java:63) ~[fabric-loader-0.15.11.jar:?]
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:472) ~[fabric-loader-0.15.11.jar:?]
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.11.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.15.11.jar:?]
    at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) ~[fabric-loader-0.15.11.jar:?]
    at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) ~[fabric-server-mc.1.20.4-loader.0.15.11-launcher.1.0.1.jar:1.0.1]
Caused by: java.lang.UnsupportedClassVersionError: com/mojang/brigadier/exceptions/CommandSyntaxException has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0
    at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.defineClassFwd(KnotClassLoader.java:160) ~[fabric-loader-0.15.11.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:355) ~[fabric-loader-0.15.11.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.15.11.jar:?]
    at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:119) ~[fabric-loader-0.15.11.jar:?]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
    at net.minecraft.class_155.<clinit>(class_155.java:265) ~[server-intermediary.jar:?]
    at net.minecraft.server.Main.main(Main.java:67) ~[server-intermediary.jar:?]
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.11.jar:?]
    ... 4 more
MiraculixxT commented 3 months ago

This error is regarding brigadier (minecrafts command system), which is only implemented by a library i use in BMarker (Silk). Still i tried a fresh 1.20.4 fabric server with only the needed mods (bluemap-5.2, fabric-api, fabric-kotlin, silk-1.10.3, bmarker-1.6.3) running on Java 17 and i receive no errors.

Logs: https://pastes.dev/F0wCWazyCg

Running the same server with Java 21 also shows that fabric is running the server on a Java 21 to 17 compatibility layers. I tested it against all my client side mods i daily drive, and not a single error appeared. So, there is no option for me to debug this