{"record":{"id":"e15e26fa641402ed","repo":"projectlombok/lombok","slug":"dependency-s-contributed-by-s-cannot-be-found","errorCode":null,"errorMessage":"Dependency %s contributed by %s cannot be found","messagePattern":"Dependency (.+?) contributed by (.+?) cannot be found","errorType":"console","errorClass":"Fail","httpStatus":null,"severity":"error","filePath":"src/core/lombok/core/runtimeDependencies/CreateLombokRuntimeApp.java","lineNumber":168,"sourceCode":"\t\t\t}\n\t\t}\n\t\t\n\t\tif (deps.isEmpty()) {\n\t\t\tSystem.out.println(\"Not generating lombok-runtime.jar: No lombok transformations currently have any runtime dependencies!\");\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tOutputStream out = new FileOutputStream(outFile);\n\t\tboolean success = false;\n\t\ttry {\n\t\t\tJarOutputStream jar = new JarOutputStream(out);\n\t\t\tdeps.put(\"LICENSE\", CreateLombokRuntimeApp.class);\n\t\t\tdeps.put(\"AUTHORS\", CreateLombokRuntimeApp.class);\n\t\t\tfor (Entry<String, Class<?>> dep : deps.entrySet()) {\n\t\t\t\tInputStream in = dep.getValue().getResourceAsStream(\"/\" + dep.getKey());\n\t\t\t\ttry {\n\t\t\t\t\tif (in == null) {\n\t\t\t\t\t\tthrow new Fail(String.format(\"Dependency %s contributed by %s cannot be found\", dep.getKey(), dep.getValue()));\n\t\t\t\t\t}\n\t\t\t\t\twriteIntoJar(jar, dep.getKey(), in);\n\t\t\t\t} finally {\n\t\t\t\t\tif (in != null) in.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\tjar.close();\n\t\t\tout.close();\n\t\t\t\n\t\t\tSystem.out.println(\"Successfully created: \" + canonical(outFile));\n\t\t\t\n\t\t\treturn 0;\n\t\t} catch (Throwable t) {\n\t\t\ttry { out.close();} catch (Throwable ignore) {}\n\t\t\tif (!success) outFile.delete();\n\t\t\tif (t instanceof Fail) {\n\t\t\t\tSystem.err.println(t.getMessage());\n\t\t\t\treturn 1;","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/projectlombok/lombok/blob/6d6a3e9fec0a9555702561fbeb8eac836575116e/src/core/lombok/core/runtimeDependencies/CreateLombokRuntimeApp.java#L150-L186","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"String res = \"/LICENSE\";\nif (CreateLombokRuntimeApp.class.getResourceAsStream(res) == null) {\n    throw new IllegalStateException(\"Lombok jar is incomplete/corrupted: missing \" + res);\n}","typeGuard":null,"tryCatchPattern":"try { app.runApp(args); } catch (Fail f) { System.err.println(\"Runtime jar build failed: \" + f.getMessage() + \" — replace lombok jar with an official build\"); }","preventionTips":["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"],"tags":["lombok","classpath","missing-resource"],"backgroundTag":"missing-dependency","analyzedSha":"6d6a3e9fec0a9555702561fbeb8eac836575116e","analyzedAt":"2026-09-07T23:18:01.841Z","contentChangedAt":"2026-09-07T23:18:01.841Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}