What java.lang.module.ResolutionException means in Minecraft
java.lang.module.ResolutionException in Minecraft means Java could not put the mods together into one set of modules, so NeoForge or Forge stopped before loading a single mod. On a NeoForge 1.21.1 server running Java 21, it came 1.7 seconds after the loader started:
NeoForge 1.21.1, in the console
[main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 11.0.5+main.901c6ea8 starting: java version 21.0.13 by Eclipse Adoptium; ...
[main/ERROR] [cpw.mods.modlauncher.ModuleLayerHandler/]: Error while resolving modules.
java.lang.module.ResolutionException: Module CrashAssistant.neoforge contains package dev.kostromdan.mods.crash_assistant.common_config.scripts.permissions, module dev.kostromdan.mods.crash_assistant.core_mod exports package dev.kostromdan.mods.crash_assistant...
at java.base/java.lang.module.Resolver.failTwoSuppliers(Resolver.java:806) ~[?:?]
at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:493) ~[?:?]Since 1.17, Forge has loaded mods through the Java module system, and NeoForge builds a module for every mod from its own version of it. A module is a jar with a name and a list of packages, the folders its code sits in. By default a mod's module is fully open and shares all of its packages with the others.
Java has one firm rule here. The Java documentation for Configuration.resolve says resolution fails when two or more modules export the same package to a module that reads both, including the case where a module that contains a package reads another module that also offers it. Java will not guess which of the two copies you meant, so it stops.
| Part of the line | What it tells you |
|---|---|
Error while resolving modules. | The loader could not build the set of modules. No mod has started yet. |
Module CrashAssistant.neoforge | The first module. It has the package in its own jar. |
contains package dev.kostromdan...permissions | One package that both jars hold. There can be many more; Java reports the first one it finds. |
module dev.kostromdan.mods.crash_assistant.core_mod exports package ... | The second module, which offers the same package to the first one. |
Resolver.failTwoSuppliers | Java's own name for the problem: two suppliers of one package. |
On a server this means the same code is on it twice. That can be one mod in two files, for example two versions of it, or one mod that brings its own copy of code that another jar also carries. The fix is to keep one copy and remove the other.
"Module contains package, module exports package to": find the two jars
"Module contains package, module exports package to" names 2 modules, and each module is a jar: the name before contains package and the name after module. The package in the middle only shows what they share. To get from a module name to a file, it helps to know where the name comes from.
- A mod can set its module name in its jar, with
Automatic-Module-Namein the manifest. Forge reads that setting, so the name can look nothing like the file name. - Without that setting, Java makes the name from the file name: it drops
.jar, cuts off the version from the first hyphen followed by a digit, and turns other characters into dots. Java's own example turnsfoo-bar-1.2.3-SNAPSHOT.jarintofoo.bar. - A mod can carry other jars inside its own file, called Jar-in-Jar. Those count as modules too, and NeoForge's documentation says each one needs a module name that is unique across all loaded jars. A module name you cannot match to any file in
modsmay sit inside another mod.
In the case above, both names point to one mod. CrashAssistant.neoforge reads like Crash Assistant's NeoForge file, and dev.kostromdan.mods.crash_assistant.core_mod starts with the package of its author, KostromDan. Both modules contained the same packages, including copies of libraries the mod bundles under crash_assistant_relocated_libs. When both module names belong to the same mod like this, look for that mod twice: two files of it, or a file next to a copy that another jar already brings along.
When the two names belong to two different mods, the shared package tells you whose code it is. A package that starts with a mod's own name means one jar carries a copy of the other mod. A package from a general library means both mods brought that library along. In that case, check whether either mod has a newer build that does not clash, or whether you can do without one of them.
Crash Assistant does nothing on a server
Crash Assistant's Modrinth page lists it as client-side only and says it does nothing on servers. It opens a crash window on a player's computer. On a server you can remove every file of it, which fixes this case either way; players can keep it in their own game. Client-only mods covers other mods that belong on the player's side only.
Why the package in the ResolutionException changes every restart
The package in a ResolutionException can change every restart, because Java checks the shared packages in an order that differs from one run to the next and stops at the first clash. These 3 starts on the same NeoForge 1.21.1 server came within three minutes of each other:
NeoForge 1.21.1, three starts in a row
[11Nov2026 18:11:13.955] [main/ERROR] [cpw.mods.modlauncher.ModuleLayerHandler/]: Error while resolving modules.
java.lang.module.ResolutionException: Module dev.kostromdan.mods.crash_assistant.core_mod contains package crash_assistant_relocated_libs.logging.impl, module CrashAssistant.neoforge exports package crash_assistant_relocated_libs.logging.impl to dev.kostromdan...
[11Nov2026 18:12:53.361] [main/ERROR] [cpw.mods.modlauncher.ModuleLayerHandler/]: Error while resolving modules.
java.lang.module.ResolutionException: Module dev.kostromdan.mods.crash_assistant.core_mod contains package crash_assistant_relocated_libs.jexl3.scripting, module CrashAssistant.neoforge exports package crash_assistant_relocated_libs.jexl3.scripting to dev.kost...
[11Nov2026 18:14:01.743] [main/ERROR] [cpw.mods.modlauncher.ModuleLayerHandler/]: Error while resolving modules.
java.lang.module.ResolutionException: Module CrashAssistant.neoforge contains package dev.kostromdan.mods.crash_assistant.common_config.scripts.permissions, module dev.kostromdan.mods.crash_assistant.core_mod exports package dev.kostromdan.mods.crash_assistant...| Start | Package in the line | Module named first |
|---|---|---|
| 18:11 | crash_assistant_relocated_libs.logging.impl | dev.kostromdan.mods.crash_assistant.core_mod |
| 18:12 | crash_assistant_relocated_libs.jexl3.scripting | dev.kostromdan.mods.crash_assistant.core_mod |
| 18:14 | dev.kostromdan.mods.crash_assistant.common_config.scripts.permissions | CrashAssistant.neoforge |
Java's documentation says the order in which its fixed sets are walked through is unspecified. In Java's source, that order comes from a value picked at every start, written so the order will vary between runs. The two jars share many packages. Each start, Java meets a different one of them first, reports it and stops. That is why the package jumps around while the problem stays the same.
The pair of modules does not change, because those are the two jars that overlap. Their order can flip, as it did at 18:14: Java always writes the module that has the package in its own jar first, and which of the two that is depends on which one it was checking at that moment. So ignore the package when you compare starts, and look at the two module names. If those stay the same, you are looking at one problem, not three.
How to fix java.lang.module.ResolutionException on Lodehost
Fixing java.lang.module.ResolutionException on Lodehost takes one change: leave 1 copy of the shared code on the server instead of 2. On the panel it goes like this:
Note the two module names
Open the Console tab, or
logs/latest.logon the Files tab, and find the line underError while resolving modules.Write down the name afterModuleand the name aftermodule ... exports. Skip the package.Make a backup
On the Backups tab, make a backup before you remove anything. If you take off the wrong file, you can restore it with the server stopped.
Look for two files of one mod
On the Mods tab, look through Installed mods for the mod behind the names. With more than 20 mods, type part of the name in Filter installed mods. Two files of the same mod, such as two versions, is the clash.
Check the mods folder
Open
modson the Files tab as well. A file that was uploaded by hand shows up there too, and the file names are easier to compare side by side. Look for names that start the same way.Remove the extra copy
Press Remove next to the file you do not want, and keep the build made for your loader and exact Minecraft version. If you are not sure which build that is, remove both and add the mod again from the Verified Modrinth catalog with Verify & install.
Start the server and read the console again
If the same two module names come back, a copy is still there, possibly inside another mod's jar. If the names are different, there was a second overlap, and you repeat the steps for that pair.
When the two modules are two different mods and neither is a spare copy, removing one is the quick way to get the server running. Then check both mods' pages for builds made for your version; a newer release of one of them may no longer carry the shared code. Players need the same mod list as the server, so remove the mod from the pack they use as well, unless it is a client-only mod. Join a modded server covers how players match the server.
"Modules export package to module" and "reads more than one module named"
"Modules X and Y export package P to module Z" and "Module X reads more than one module named Y" are 2 other forms of the same ResolutionException, written by the same part of Java. They come from Java's source code, not from a crash on one of our servers, so here they are as templates:
| Message | What it means on a server |
|---|---|
Module X contains package P, module Y exports package P to X | X has the package itself, and Y offers it too. Two jars, one package. This is the case in this guide. |
Modules X and Y export package P to module Z | Neither X nor Y is the mod that needs the package. Both offer it to a third mod, Z. Look for X and Y; Z is only the mod that noticed. |
Module X reads more than one module named Y | Two modules with the same name. Java's documentation lists a module reading two modules with the same name as a reason resolution fails. Look for two copies of whatever Y is. |
All three come down to the same rule: the code a mod uses has to come from one place. The fix is the same as well: find the jars behind the names and keep one copy.
Other messages look alike but are not this error. Missing or unsupported mandatory dependencies means a required mod is missing, see missing mod dependencies. NoClassDefFoundError means a class is not there at all, see NoClassDefFoundError. If you cannot find the error line at all, reading crash reports and logs shows where it sits.
Written and checked by the Lodehost team, last reviewed on 16 November 2026.






