Forge Server Tools · every failure mode · guides

Attempted to load class for invalid dist DEDICATED_SERVER

Client-only code reached the dedicated server — FATAL

What this actually means

A mod referenced a client-only class (a Screen, Minecraft.getInstance(), a renderer) from code that runs on the server. Forge's RuntimeDistCleaner strips client classes out of the server jar, so the reference explodes at class-load time rather than at the call.

How to fix it

How to be sure it is this

Search the log for DEDICATED_SERVER. The class named just before it will be under net.minecraft.client, or a mod package containing client, render, gui or screen. If the named class is not client-related, this is not your failure.

What it gets mistaken for

Looks almost identical to a stale or partial jar, which also throws NoClassDefFoundError. The difference is which class is missing: a vanilla client class means this; a class from the mod's own package means a bad download.

What to do next

If removing the mod is not acceptable, check whether it publishes a separate server build, and whether the pack marks it client-side. Report it upstream with the stack trace — the author's fix is usually a one-line @OnlyIn(Dist.CLIENT) guard, and they cannot fix what they have not seen.

What it looks like in your log

Search your crash report or latest.log for any of these:

Attempted to load class  ...  for invalid dist DEDICATED_SERVER
RuntimeDistCleaner  ...  invalid dist

The free edition covers the six most common startup failures, and this is not one of them — it is in the paid tool, which checks all 24 and names the mod jar from the stack trace. The fix above is the same one it prints, so you do not need it to solve this.