Solved - can't start the server - fresh install
koopernick opened this issue ยท 2 comments
Bug Description
When launching the server (fresh install)
root@Minecraft:/home# ./ServerStart.sh
Starting SevTech Ages Server...
A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
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')
at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
... 6 more
Did this behavior use to work in the previous version?
Irrelevant
Steps to Reproduce (for bugs)
I ran "Install.sh".
Then "ServerStart.sh".
Both files have permissions.
Logs
- Client/Server Log:irrelevant
- Crash Log:
root@Minecraft:/home# ./ServerStart.sh
Starting SevTech Ages Server...
A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
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')
at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
... 6 more
Client Information
- Modpack Version:irrelevant, the server crash
- Java Version:irrelevant, the server crash
- Launcher Used:irrelevant, the server crash
- Memory Allocated:irrelevant, the server crash
- Server/LAN/Single Player:irrelevant, the server crash
- Optifine Installed:irrelevant, the server crash
- Shaders Enabled:irrelevant, the server crash
World Information
- Modpack Version world created in:3.1.7 (the word is not created yet since it crashes)
- Additional Content Installed:no
Server Information
- Java Version:
root@Minecraft:/home# java -version
openjdk version "11.0.9" 2020-10-20
OpenJDK Runtime Environment (build 11.0.9+11-Ubuntu-0ubuntu1.18.04.1)
OpenJDK 64-Bit Server VM (build 11.0.9+11-Ubuntu-0ubuntu1.18.04.1, mixed mode, sharing)
- Operating System:
Ubuntu 18.04.5 LTS
root@Minecraft:/home# uname -a
Linux Minecraft 5.4.65-1-pve #1 SMP PVE 5.4.65-1 (Mon, 21 Sep 2020 15:40:22 +0200) x86_64 x86_64 x86_64 GNU/Linux
- Hoster/Hosting Solution:own server
- Sponge (Non-Vanilla Forge) Server:No idea what this means
Forge for Minecraft 1.12.2 requires you use Java 8.
You can install this on Ubuntu by issuing the command
sudo apt install openjdk-8-jre
You then set it as the default by executing:
sudo update-alternatives --config java
And entering the number corresponding to Java 8 followed by the return key.
Note: typed this on my phone, watch out for errors as a result of autocorrect.