Lodehost logoLodehost

Performance and fixes

java.lang.NoClassDefFoundError on a Minecraft server: find the mod that is missing

java.lang.NoClassDefFoundError: com/cupboard/config/ICommonConfig means a mod on your server reached for a piece of code from another mod, and that mod was not there, or not in the version it was built against. The crash report names the mod that failed, as in Smoothchunk mod (smoothchunk) has failed to load correctly, and the class name says what it was looking for: the first part of the name, com/cupboard, belongs to the mod you need. This guide shows how to read both lines on Forge and NeoForge, how to find the mod behind a package name, and what to do when that mod is already installed.

4 min read

Configure your serverPick a plan and order your server.
A grass island with a server tower, a bookshelf block with one book missing from its top shelf, and a mint mod crate in front of it next to an orange warning sign
One book is missing from the library. The mod that needs it stops the server until it is back.

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
LineWhat it tells you
Mod file: .../smoothchunk-1.21-4.1.jarThe jar of the mod that failed to load.
Smoothchunk mod (smoothchunk) has failed to load correctlyIts name and mod ID. The mod itself is fine; it is missing something.
NoClassDefFoundError: com/cupboard/config/ICommonConfigThe class it could not find. The first part, com/cupboard, points to the mod that has it.
ClassNotFoundException: com.cupboard.config.ICommonConfigThe 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 crashMod that has itNeeded by
com/cupboard/config/ICommonConfigCupboard, a librarySmoothchunk, NeoForge 1.21.1
me/shedaniel/autoconfig/ConfigDataCloth Config APIEMIDiscovery, NeoForge 1.21.1
com/simibubi/create/foundation/utility/LangCreateCreate: 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

  1. 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.

  2. Or upload it

    A library that is not in the catalog goes in through the Files tab: open mods and use Upload, or From link for a direct download address. Pick the file for your loader and your Minecraft version.

  3. 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.

FAQ

NoClassDefFoundError questions

What does java.lang.NoClassDefFoundError mean in Minecraft?

A mod tried to use a class from another mod or library that is not on the server, or not in the version it was built against. The crash report names the mod that failed and the class it was looking for.

What is the difference between NoClassDefFoundError and ClassNotFoundException?

In a Minecraft crash report they describe the same missing class. NoClassDefFoundError is the error the mod ran into; ClassNotFoundException is the failed lookup underneath it, written with dots instead of slashes.

What does "has failed to load correctly" mean?

It is how Forge and NeoForge report that a mod stopped while it was loading. The line under it says why. With NoClassDefFoundError, a class from another mod is missing.

Why did the server not say a dependency was missing?

Because the mod did not declare it as required. The loader only checks the dependencies a mod declares, so the crash came later, when the code needed the class.

Do players need the library too?

If the mod that needs it is installed on both sides, yes. Players need the same mods as the server, libraries included.

Mods that arrive with what they require.

Single NeoForge mods install from the Mods tab: mods on Modrinth with a NeoForge build for your exact version, together with what they require.

See NeoForge hosting