projectlombok/lombok · error · Fail
Dependency contributed by cannot be found
Error message
Dependency %s contributed by %s cannot be found
What it means
CreateLombokRuntimeApp.buildRuntimeJar assembles a 'lombok-runtime.jar' by copying resources (class files plus LICENSE/AUTHORS) that are bundled inside lombok's own jar, located via Class.getResourceAsStream. If a resource the map expects is absent from the classpath, it throws Fail("Dependency %s contributed by %s cannot be found"). This normally indicates a broken/partial lombok jar build rather than user error.
Solutions
- Use an intact official lombok jar (re-download from Project Lombok) and rerun
- Check that CreateLombokRuntimeApp is executed from inside the lombok jar, not from loose classes on the filesystem
- If building lombok from source, ensure the shadow/shade packaging step copies the runtime dependencies into the jar
Defensive patterns
Strategy: try-catch
Validate before calling
String res = "/LICENSE";
if (CreateLombokRuntimeApp.class.getResourceAsStream(res) == null) {
throw new IllegalStateException("Lombok jar is incomplete/corrupted: missing " + res);
} Try / catch
try { app.runApp(args); } catch (Fail f) { System.err.println("Runtime jar build failed: " + f.getMessage() + " — replace lombok jar with an official build"); } Prevention
- Never re-shade or minify the lombok jar
- Run the app from the original lombok jar, not extracted classes
- Verify jar integrity/checksums before use
When it happens
Trigger: Running the runtime-jar creation when one of the listed resources (e.g. '/LICENSE', '/AUTHORS', or a patched runtime class like '/lombok/launch/PatchFixesShadowLoaded.class') is missing from the jar that contains CreateLombokRuntimeApp, because getResourceAsStream returns null.
Common situations: A corrupted, truncated, or repackaged lombok jar (e.g. shaded/minified by another build), running a class extracted out of the jar without its resources, or a custom/modified lombok build that dropped the bundled dependencies.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- Can't translate to a class object.
- I can't make sense of this annotation value. Try using a…
- Expected a single value, but
- Can't translate to an enum of type
- You must use constant literals in lombok annotations; they…
AI-assisted analysis of projectlombok/lombok@6d6a3e9fec (2026-09-07).
Data as JSON: /api/errors/e15e26fa641402ed.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/lombok/core/runtimeDependencies/CreateLombokRuntimeApp.java:168
}
}
if (deps.isEmpty()) {
System.out.println("Not generating lombok-runtime.jar: No lombok transformations currently have any runtime dependencies!");
return 1;
}
OutputStream out = new FileOutputStream(outFile);
boolean success = false;
try {
JarOutputStream jar = new JarOutputStream(out);
deps.put("LICENSE", CreateLombokRuntimeApp.class);
deps.put("AUTHORS", CreateLombokRuntimeApp.class);
for (Entry<String, Class<?>> dep : deps.entrySet()) {
InputStream in = dep.getValue().getResourceAsStream("/" + dep.getKey());
try {
if (in == null) {
throw new Fail(String.format("Dependency %s contributed by %s cannot be found", dep.getKey(), dep.getValue()));
}
writeIntoJar(jar, dep.getKey(), in);
} finally {
if (in != null) in.close();
}
}
jar.close();
out.close();
System.out.println("Successfully created: " + canonical(outFile));
return 0;
} catch (Throwable t) {
try { out.close();} catch (Throwable ignore) {}
if (!success) outFile.delete();
if (t instanceof Fail) {
System.err.println(t.getMessage());
return 1;View on GitHub (pinned to 6d6a3e9fec)