Skip to content

Minecraft 1.21 Fabric error #2916

Description

@RobsonTigerPl

Describe the problem

I have problem with Fabric 1.21, server doesnt start. Its my first time using Fabric server, before I used only vanilla and curseforge.
I don't know what to do, i tried other java versions but it doesnt work neither

Container definition

version: "3.8"

services:
  fabric:
    image: itzg/minecraft-server:java17
    tty: true
    stdin_open: true
    restart: unless-stopped
    ports:
      - "25565:25565"
    container_name: "fabric"
    environment:
      VERSION: 1.21
      TYPE: "FABRIC"
      EULA: "TRUE"
      MEMORY: "12G"
      SPAWN_PROTECTION: 0
      VIEW_DISTANCE: 15
      SERVER_NAME: "gwf.fabric"
      TZ: Europe/Warsaw
      ENABLE_WHITELIST: true
      WHITELIST: "my mc username"
    volumes:
      # attach the relative directory 'data' to the container's /data path
      - ./data:/data

Container logs

fabric  | [init] Running as uid=1000 gid=1000 with /data as 'drwxr-xr-x 4 1000 1000 4096 Jun 19 13:49 /data'
fabric  | [init] Resolving type given FABRIC
fabric  | [mc-image-helper] 14:09:36.052 INFO  : Fabric launcher for minecraft 1.21 loader 0.15.11 is already available
fabric  | [init] Enabling whitelist functionality
fabric  | [mc-image-helper] 14:09:38.004 INFO  : Created/updated 1 property in /data/server.properties
fabric  | [mc-image-helper] 14:09:38.761 INFO  : The file /data/whitelist.json already exists, so no changes will be made
fabric  | [init] Setting initial memory to 12G and max to 12G
fabric  | [init] Starting the Minecraft server...
fabric  | [14:09:42] [ERROR] [FabricLoader/]: Uncaught exception in thread "main"
fabric  | java.lang.RuntimeException: An exception occurred when launching the server!
fabric  |       at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:71)
fabric  |       at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69)
fabric  | Caused by: java.lang.RuntimeException: Error invoking MC server bundler: java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main 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
fabric  |       at net.fabricmc.loader.impl.game.minecraft.BundlerProcessor.process(BundlerProcessor.java:102)
fabric  |       at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.locateGame(MinecraftGameProvider.java:192)
fabric  |       at net.fabricmc.loader.impl.launch.knot.Knot.createGameProvider(Knot.java:175)
fabric  |       at net.fabricmc.loader.impl.launch.knot.Knot.init(Knot.java:130)
fabric  |       at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:68)
fabric  |       at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23)
fabric  |       at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69)
fabric  |       ... 1 more
fabric  | Caused by: java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main 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
fabric  |       at java.base/java.lang.ClassLoader.defineClass1(Native Method)
fabric  |       at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
fabric  |       at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
fabric  |       at net.fabricmc.loader.impl.game.minecraft.BundlerProcessor$1.loadClass(BundlerProcessor.java:65)
fabric  |       at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
fabric  |       at java.base/java.lang.Class.forName0(Native Method)
fabric  |       at java.base/java.lang.Class.forName(Unknown Source)
fabric  |       at net.fabricmc.loader.impl.game.minecraft.BundlerProcessor.process(BundlerProcessor.java:85)
fabric  |       ... 7 more
fabric  | 2024-06-19T14:09:42.694+0200  WARN    mc-server-runner        Minecraft server failed. Inspect logs above for errors that indicate cause. DO NOT report this line as an error.        {"exitCode": 1}
fabric  | 2024-06-19T14:09:42.694+0200  INFO    mc-server-runner        Done

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions