How to Fix java.lang.RuntimeException
java.lang.RuntimeException only wraps the real error. How to read Caused by in a Minecraft crash report and find the mod or file behind it.
Quick Fix
Open the crash report, scroll to the last Caused by line and fix the error named there. RuntimeException itself only wraps it.
Error Message
java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'examplemod' at 'com.example.ExampleMod'!How to Fix
Open the newest file in the crash-reports folder. Its name contains the date and ends in client.txt or server.txt.
Read the Description line, then scroll down the stack trace to the last Caused by. That is the original error.
Look for a mod ID or package name in the lines under that Caused by, and update or remove that mod.
For Could not execute entrypoint stage, update or remove the mod whose ID appears after provided by.
A short line with a number and the word more, such as 12 more, stands for lines that are the same as in the error above, so nothing is hidden.
Check latest.log as well, because errors that don't crash the game only appear there.
Common Causes
- A mod failed while the game started. Fabric Loader reports that as Could not execute entrypoint stage, with the stage, the mod ID and the class, and the mod's own error follows under Caused by.
- Code wrapped another error in a RuntimeException with its own message. The original error is listed under Caused by.
- Several errors happened at once. Java lists the extra ones under Suppressed, and they can explain more than the first one.
Diagnostic Steps
- Open the newest crash report.
- Scroll to the last Caused by.
- Find the mod or file named there.
- Update, fix or remove it, then start again.
FAQ
Why is the error so vague?
RuntimeException is Java's general unchecked exception, so code often uses it to wrap another error. The Caused by lines below it name what actually went wrong.
What do the lines ending in more mean in a stack trace?
Java leaves out the lines a cause shares with the error above it and prints how many it left out. Those lines are identical to the ones already shown.
Where do I find the crash report?
In the crash-reports folder of your game directory or server folder. Each report is named after the date and time and ends in client.txt or server.txt.
Related Errors
How to Fix java.lang.NullPointerException
java.lang.NullPointerException
How to Fix java.lang.IllegalStateException
java.lang.IllegalStateException
How to Fix Fabric Crash on Startup
Fabric Loader has detected a critical error and cannot continue
How to Read Minecraft Crash Reports
---- Minecraft Crash Report ----