itzg / docker-minecraft-server

Docker image that provides a Minecraft Server that will automatically download selected version at startup
https://docker-minecraft-server.readthedocs.io/
Apache License 2.0
8.79k stars 1.47k forks source link

1.12.2 Modpack server doesnt start. A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException #2734

Closed MrLuxALot closed 3 months ago

MrLuxALot commented 3 months ago

Describe the problem

I cant manage to start a modpack server for version 1.12.2. It seems to be an issue with JDK 8, but i cant resolve the issue. I tried installing oracle and openJDK 8 on my pc and add it to my path. Minecraft version: 1.12.2 Modpack: NomiFactory GTceu

Container definition

version: "3.8"

services: mc: image: itzg/minecraft-server tty: true stdin_open: true ports:

Container logs

2024-03-23 15:24:46 [init] Running as uid=1000 gid=1000 with /data as 'drwxrwxrwx 1 1000 1000 4096 Mar 22 17:41 /data' 2024-03-23 15:24:50 [mc-image-helper] 14:24:50.594 INFO : Requested CurseForge modpack 1.6.1a is already installed for Nomifactory CEu 2024-03-23 15:24:51 [mc-image-helper] 14:24:51.363 INFO : Forge version 14.23.5.2860 for minecraft version 1.12.2 is already installed 2024-03-23 15:24:53 [mc-image-helper] 14:24:53.599 INFO : Created/updated 1 property in /data/server.properties 2024-03-23 15:24:56 [init] Setting initial memory to 1G and max to 6G 2024-03-23 15:24:58 [init] Starting the Minecraft server... 2024-03-23 15:24:58 A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException 2024-03-23 15:24:58 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2024-03-23 15:24:58 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2024-03-23 15:24:58 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2024-03-23 15:24:58 at java.base/java.lang.reflect.Method.invoke(Unknown Source) 2024-03-23 15:24:58 at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70) 2024-03-23 15:24:58 at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34) 2024-03-23 15:24:58 Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap') 2024-03-23 15:24:58 at net.minecraft.launchwrapper.Launch.(Launch.java:34) 2024-03-23 15:24:58 at net.minecraft.launchwrapper.Launch.main(Launch.java:28) 2024-03-23 15:24:58 ... 6 more 2024-03-23 15:24:58 2024-03-23T14:24:58.538Z 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} 2024-03-23 15:24:58 2024-03-23T14:24:58.538Z INFO mc-server-runner Done

MrLuxALot commented 3 months ago

Found the issue: https://github.com/itzg/docker-minecraft-server/issues/2410