Dynmap crashes quilt but works on fabric

I cannot get Dynmap to run on my server through quilt and q/fapi, only on fabric/forge/etc, crashing with “URI scheme is not “file””.
Running Minecraft 1.19.2 with Quilt Loader 0.18.1-beta.49

Quilt loader throws an Entrypoint exception while initializing the mod. The console log shows only this (trimmed to stack trace since server starts otherwise):

[14:54:21] [main/ERROR]: Failed to start the minecraft server
java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'dynmap'!
	at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$2(EntrypointUtils.java:66) ~[quilt-loader-0.18.1-beta.49.jar:?]
	at org.quiltmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:34) ~[quilt-loader-0.18.1-beta.49.jar:?]
	at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:64) ~[quilt-loader-0.18.1-beta.49.jar:?]
	at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invokeContainer(EntrypointUtils.java:49) ~[quilt-loader-0.18.1-beta.49.jar:?]
	at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:36) ~[quilt-loader-0.18.1-beta.49.jar:?]
	at org.quiltmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:65) ~[quilt-loader-0.18.1-beta.49.jar:?]
	at net.minecraft.server.Main.main(Main.java:101) [transformed-mod-minecraft.i0:0/:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:484) [quilt-loader-0.18.1-beta.49.jar:?]
	at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:82) [quilt-loader-0.18.1-beta.49.jar:?]
	at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:31) [quilt-loader-0.18.1-beta.49.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.quiltmc.loader.impl.launch.server.QuiltServerLauncher.main(QuiltServerLauncher.java:66) [quilt-loader-0.18.1-beta.49.jar:?]
Caused by: java.lang.IllegalArgumentException: URI scheme is not "file"
	at java.io.File.<init>(File.java:423) ~[?:?]
	at org.dynmap.fabric_1_19_1.DynmapMod.onInitialize(DynmapMod.java:32) ~[transformed-mod-dynmap.i0:0/:?]
	at org.quiltmc.loader.impl.game.minecraft.Hooks.lambda$startServer$2(Hooks.java:65) ~[quilt-loader-0.18.1-beta.49.jar:?]
	at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke$0(EntrypointUtils.java:36) ~[quilt-loader-0.18.1-beta.49.jar:?]
	at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:62) ~[quilt-loader-0.18.1-beta.49.jar:?]
	... 16 more

The relevant piece of Dynmap’s code is:

public class DynmapMod implements ModInitializer {
    private static final String MODID = "dynmap";
    private static final ModContainer MOD_CONTAINER = FabricLoader.getInstance().getModContainer(MODID)
            .orElseThrow(() -> new RuntimeException("Failed to get mod container: " + MODID));
    // The instance of your mod that Fabric uses.
    public static DynmapMod instance;

    public static File jarfile;

    @Override
    public void onInitialize() {
        instance = this;

        Path path = MOD_CONTAINER.getRootPath();
        try {
            jarfile = new File(DynmapCore.class.getProtectionDomain().getCodeSource().getLocation().toURI());
        } catch (URISyntaxException e) {
            Log.severe("Unable to get DynmapCore jar path", e);
        }

From what I can read myself I imagine that whatever “DynmapCore.class.getProtectionDomain().getCodeSource().getLocation().toURI()” resolves to ends up not being a file, since the exception is caused by “File” and not Dynmap.

Not sure about this one - you could try it with the latest Quilt Loader 0.17.x release, but this may be something that needs reporting to the Dynmap team instead.

It works! …
But the 0.17 releases break most of the other mods I use, something about

Dependency for mod on fabricloader versions [>=0.14.12] (0 valid options, 1 invalid options)
	x provided mod 'fabricloader' version '0.14.11' from mod 'quilt_loader' version 0.17.8

It has been a struggle to find access to all these files without having to run java instances every 5 minutes.

Try adding -Dloader.workaround.jar_copied_mods=dynmap to your java arguments. That is, if you want to keep using 0.18.x betas.

Your other mods don’t work on 0.17.8, because it’s not the latest. You need 0.17.10.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.