What java.lang.NoClassDefFoundError means on a Minecraft server
java.lang.NoClassDefFoundError on a Minecraft server means one mod asked for a class, a piece of compiled code, that no jar in the mods folder contains, so Forge or NeoForge stopped the start. On a NeoForge 1.21.1 server the crash report showed it like this:
NeoForge 1.21.1, in the crash report
Mod file: /home/container/mods/smoothchunk-1.21-4.1.jar
Failure message: Smoothchunk mod (smoothchunk) has failed to load correctly
java.lang.NoClassDefFoundError: com/cupboard/config/ICommonConfig
Mod version: 4.1
Exception message: java.lang.ClassNotFoundException: com.cupboard.config.ICommonConfig| Line | What it tells you |
|---|---|
Mod file: .../smoothchunk-1.21-4.1.jar | The jar of the mod that failed to load. |
Smoothchunk mod (smoothchunk) has failed to load correctly | Its name and mod ID. The mod itself is fine; it is missing something. |
NoClassDefFoundError: com/cupboard/config/ICommonConfig | The class it could not find. The first part, com/cupboard, points to the mod that has it. |
ClassNotFoundException: com.cupboard.config.ICommonConfig | The same class with dots instead of slashes. Same problem, not a second one. |
NoClassDefFoundError and ClassNotFoundException turn up together here. The first is the error the mod ran into: a class it was built with is not there now. The second is the lookup underneath that came back empty. Both point at the same missing piece.
Find the mod behind the class name
The class name starts with the package of the mod that should contain it, and mods name their packages after themselves or their author. These 3 crashes came from servers we host:
| Class in the crash | Mod that has it | Needed by |
|---|---|---|
com/cupboard/config/ICommonConfig | Cupboard, a library | Smoothchunk, NeoForge 1.21.1 |
me/shedaniel/autoconfig/ConfigData | Cloth Config API | EMIDiscovery, NeoForge 1.21.1 |
com/simibubi/create/foundation/utility/Lang | Create | Create: Dreams & Desires, Forge 1.20.1 |
When the package does not give the name away, the page of the mod that failed lists what it needs: under Dependencies on Modrinth and under Relations on CurseForge. EMIDiscovery's Modrinth page lists Cloth Config API and EMI as required, and Cloth Config API is where me/shedaniel/autoconfig comes from.
How to fix NoClassDefFoundError on Lodehost
Fixing NoClassDefFoundError comes down to one question: is the mod that owns the class on the server or not?
The mod is not installed
Search it on the Mods tab
Type its name under Verified Modrinth catalog and press Verify & install. The catalog only offers builds for your loader and Minecraft version, and a mod comes with what it requires.
Or upload it
A library that is not in the catalog goes in through the Files tab: open
modsand use Upload, or From link for a direct download address. Pick the file for your loader and your Minecraft version.Start the server and read the report again
A library can need a library of its own. If it does, the next start fails on the next missing class, and you repeat the same steps for that one.
The mod is installed
Then the version you have does not contain that class, because it was moved, renamed, removed or not added yet. The mod that failed was built against another version of it. Check on that mod's page which version of the other mod it needs and install that one, or use a build of the failing mod made for the version you run. Create add-ons are the clearest case: an add-on and Create itself have to be versions made for each other.
Why the loader did not warn you first
Forge and NeoForge check the mods that a mod declares as required before anything loads, and stop with Missing or unsupported mandatory dependencies when one is gone. A mod that uses a library without declaring it gets past that check, and the crash only comes when its code reaches for the class. Missing mod dependencies covers the other message.
NoClassDefFoundError: net/minecraft/class_310 and other client classes
java.lang.NoClassDefFoundError: net/minecraft/class_310 on a Fabric server means a mod reached for the game client itself: class_310 is Fabric's name for the Minecraft client on 1.21.11 and older. A name that starts with net/minecraft/client/ is the same thing. No library adds those classes, because a server never has them.
The mod is made for players' computers only and has to come off the server; players can keep it in their own game. Client-only mods shows how to find it, including the Forge and NeoForge version of this crash.
Written and checked by the Lodehost team, last reviewed on 8 November 2026.






