critical java
In the console
java.lang.OutOfMemoryError: Java heap space
OutOfMemoryError: Java heap space
The JVM used all of the heap it was allowed (-Xmx) and could not free enough. The server usually freezes or crashes right after. Common causes: too little memory for the player count or modpack, too many loaded chunks or entities, or a plugin or mod leaking memory.
How to fix it
- Check the Performance tab: a steady climb over hours points to a leak, a plateau at the limit means the server simply needs more.
- Give the JVM more heap if the server's memory limit allows it, keeping -Xmx about 10-15% below the container limit.
- Reduce memory use: lower view-distance and simulation-distance, limit entities and item drops, pre-generate the world.
- Remove or update plugins and mods known for leaks; a heap dump or a profiler such as spark shows which one holds the memory.
critical java
In the console
OutOfMemoryError: GC overhead limit exceeded
The JVM was spending more than 98% of its time in garbage collection while freeing almost nothing. The heap is effectively full and the server is barely running.
How to fix it
- Treat this like a heap out-of-memory: raise -Xmx (below the container limit) or reduce load.
- Look for a memory leak if usage climbs steadily between restarts.
- Use modern GC flags (G1GC with sensible pause targets, such as the widely used Aikar flags for Minecraft).
critical java
In the console
OutOfMemoryError: Metaspace
OutOfMemoryError: Compressed class space
Metaspace holds loaded class definitions. Large modpacks, many plugins, or plugins that reload themselves repeatedly can exhaust it.
How to fix it
- Avoid /reload and plugin managers that hot-reload plugins; restart the server instead.
- If you set -XX:MaxMetaspaceSize, raise it or remove it so it can grow.
- Make sure the container limit leaves room above -Xmx for Metaspace and other JVM memory.
critical java
In the console
OutOfMemoryError: unable to create native thread
OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
Every Java thread needs native memory and a process slot. Either the container is out of memory outside the heap, or the container's process (PID) limit was reached, often by a plugin or mod creating threads in a loop.
How to fix it
- Lower -Xmx a little so there is more native memory left for threads.
- Look for a plugin or mod that creates a lot of threads (a thread dump or spark shows thread counts).
- Hosts: check the Wings container PID limit (container_pid_limit) if the server legitimately needs many threads.
critical java
In the console
OutOfMemoryError: Direct buffer memory
OutOfMemoryError: Cannot reserve … bytes of direct buffer memory
Networking libraries (Netty) and some plugins use direct memory outside the heap. It ran out, usually under heavy network load or because of a leak.
How to fix it
- Leave more room between -Xmx and the container limit, or set -XX:MaxDirectMemorySize explicitly.
- Update the server software and network-heavy plugins (proxies, voice chat, web maps).
- Check the Performance tab for network spikes when it happens.
critical java
In the console
There is insufficient memory for the Java Runtime Environment to continue
Native memory allocation (mmap) failed
The JVM could not get the memory it needed from the system. The container limit is lower than what the JVM was told to use, or the node itself is out of memory.
How to fix it
- Make sure -Xmx/-Xms are below the server's memory limit (leave 10-15% headroom).
- If the values are already sensible, the node may be overcommitted; tell your host or admin.
critical java
In the console
Could not reserve enough space for object heap
Error occurred during initialization of VM
The -Xmx or -Xms value is larger than the memory the container can give, so the JVM refuses to start.
How to fix it
- Lower -Xmx/-Xms on the Startup page, or set the memory startup variable lower than the server's memory limit.
- Remember the value is in megabytes when written as -Xmx4096M and gigabytes when written as -Xmx4G.
critical java
In the console
Invalid maximum heap size: flag
Invalid maximum heap size
The heap flag flag is not a valid size. Typical mistakes are a missing unit, a space inside the flag, or a value of 0 when the memory variable is empty.
How to fix it
- Use the form -Xmx4096M or -Xmx4G, with no spaces.
- If the startup command uses a variable such as {{SERVER_MEMORY}}, make sure the server has a memory limit set (0 means unlimited and produces -Xmx0M).
critical java
In the console
class file version needed), this version of the Java Runtime only recognizes class file versions up to have
UnsupportedClassVersionError
has been compiled by a more recent version of the Java Runtime
The server or a plugin/mod was compiled for a newer Java than the one in the Docker image (class file needed vs have). Class file versions map to Java like this: 52 = Java 8, 55 = 11, 61 = 17, 65 = 21, 69 = 25.
How to fix it
- Open the Startup page and pick the Docker image with the Java version the server needs (modern Minecraft 1.20.5+ needs Java 21).
- If only one plugin or mod triggers this, update the server's Java or use a version of that plugin built for your Java.
- Restart the server after changing the image.
critical java
In the console
Unable to access jarfile jar
Java could not open the server jar. It does not exist with that exact name, the download failed, or the file is corrupt.
How to fix it
- Check the jar file name in the File Manager against the server jar startup variable (names are case-sensitive).
- If the jar is missing or 0 bytes, reinstall the server or upload the jar again.
- If you renamed the jar, update the startup variable to match.
critical java
In the console
Could not find or load main class class
no main manifest attribute, in class
Java started but could not find the program's entry point (class). The jar is the wrong file (for example an installer or a library), or the startup command has a stray word that Java reads as a class name.
How to fix it
- Make sure the startup jar is the server jar, not an installer (Forge/NeoForge installers must be run once to create the real server files).
- Check the startup command for typos or a misplaced argument before -jar.
critical java
In the console
Unrecognized VM option 'option'
Unrecognized option: option
Error: Could not create the Java Virtual Machine
The startup command passes a JVM flag (option) that this Java version does not support; flags are added and removed between Java versions.
How to fix it
- Remove or correct the flag in the startup command or the JVM arguments variable.
- Flags such as -XX:+UseConcMarkSweepGC were removed in newer Java; switch to G1GC flags.
critical java
In the console
A fatal error has been detected by the Java Runtime Environment
An error report file with more information is saved as file
The JVM crashed in native code and wrote an hs_err_pid file with details. This points to a native library (a mod with native code, a JNI plugin), a JVM bug or a hardware/kernel problem, not a normal Java exception.
How to fix it
- Open the hs_err_pid*.log file in the server folder and look at the 'Problematic frame' line to see which library crashed.
- Update Java (pick a newer Docker image) and any mods with native code.
- If it happens at random places, ask your host whether the node has memory errors.
error java
In the console
java.lang.StackOverflowError
Code called itself without stopping until the thread's stack ran out. It is almost always a bug in a plugin or mod, sometimes triggered by two plugins reacting to each other's events.
How to fix it
- Look at the repeating lines in the stack trace; the package name shows which plugin or mod loops.
- Update that plugin or mod, or remove it to confirm.
- Check for two plugins that both modify the same thing (for example two chat formatters).
error java
In the console
java.lang.NoClassDefFoundError: class
java.lang.ClassNotFoundException: class
Something tried to use a class that is not available. A required library or dependency plugin/mod is missing, or the plugin was built for a different server version.
How to fix it
- Read the class name: its package usually names the missing dependency (for example net.milkbowl.vault means Vault).
- Install the dependency listed on the plugin's or mod's download page.
- Make sure the plugin version matches your server version.
error java
In the console
java.lang.NoSuchMethodError
Code called a method or field that exists in the version it was compiled against but not in the one that is running. The plugin/mod and the server (or two plugins) do not match.
How to fix it
- Find the plugin or mod in the stack trace and download the build for your exact server version.
- If the error mentions another plugin's classes, update both to matching versions.
error java
In the console
java.lang.reflect.InaccessibleObjectException
module java.base does not "opens
Older code uses reflection into Java internals that newer Java versions lock down. The plugin or library predates the Java version in use.
How to fix it
- Update the plugin or library that appears in the stack trace.
- As a stop-gap, add the --add-opens flag named in the error to the JVM arguments, or use an older Java image if the server supports it.
warning java
In the console
java.util.ConcurrentModificationException
A collection was changed while it was being looped over, often because a plugin touches game data from an async thread. It can cause random errors or lost data.
How to fix it
- Identify the plugin from the stack trace and update it.
- Report the stack trace to the plugin author if the latest version still does it.
warning java
In the console
java.lang.NullPointerException
Code tried to use a value that was empty. On its own it is a bug in whatever code appears first in the stack trace; frequent NPEs from one plugin usually mean a misconfiguration or a version mismatch.
How to fix it
- Look at the first line of the stack trace that is not part of the server itself; that package is the plugin or mod at fault.
- Check that plugin's config for missing values, then update it.
warning java
In the console
Pause Young … msms
[Full GC
The JVM paused all threads for garbage collection for a long time. Every pause over about 50 ms shows up as a lag spike for players.
How to fix it
- Use G1GC with tuned flags (for Minecraft the widely used Aikar flags).
- Set -Xms equal to -Xmx so the heap does not resize.
- If pauses grow over time, look for a memory leak; if they happen with a full heap, the server needs more memory.
error java
In the console
Invalid or corrupt jarfile jar
zip END header not found
ZipException: error in opening zip file
Java could not open a jar (the server jar or a plugin/mod) because the file is broken. It is almost always an incomplete download or upload, a file that is really an HTML error page saved as .jar, or a disk that filled up while writing.
How to fix it
- Download the jar again from its official page and upload it once more; check that its size matches the download.
- If it is the server jar, reinstall the server or set the version again so the egg downloads it fresh.
- If a plugin or mod is named nearby in the log, replace that file; if the disk was full, free space first.