eclipse-vertx/vert.x · error · RuntimeException
File not found: ${sourceFile.getAbsolutePath()} current dir
Error message
File not found: ${sourceFile.getAbsolutePath()} current dir is: ${new File(".").getAbsolutePath()} What it means
Construction failure in CompilingClassLoader: the source resource URL was found but the decoded source file is not readable (canRead() false). The message reports the source file's absolute path and the process's current directory; the input at fault is the file backing the located resource.
Source
Thrown at vertx-core/src/main/java/io/vertx/core/impl/verticle/CompilingClassLoader.java:52
*
* @author Janne Hietamäki
*/
public class CompilingClassLoader extends ClassLoader {
private static final Logger log = LoggerFactory.getLogger(CompilingClassLoader.class);
private final JavaSourceContext javaSourceContext;
private final MemoryFileManager fileManager;
public CompilingClassLoader(ClassLoader loader, String sourceName) {
super(loader);
URL resource = getResource(sourceName);
if (resource == null) {
throw new RuntimeException("Resource not found: " + sourceName);
}
//Need to urldecode it too, since bug in JDK URL class which does not url decode it, so if it contains spaces you are screwed
final File sourceFile = new File(decodeURIComponent(resource.getFile(), false));
if (!sourceFile.canRead()) {
throw new RuntimeException("File not found: " + sourceFile.getAbsolutePath() + " current dir is: " + new File(".").getAbsolutePath());
}
this.javaSourceContext = new JavaSourceContext(sourceFile);
try {
DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();
JavaCompiler javaCompiler = ToolProvider.getSystemJavaCompiler();
if (javaCompiler == null) {
throw new RuntimeException("Unable to detect java compiler, make sure you're using a JDK not a JRE!");
}
StandardJavaFileManager standardFileManager = javaCompiler.getStandardFileManager(null, null, null);
standardFileManager.setLocation(StandardLocation.SOURCE_PATH, Collections.singleton(javaSourceContext.getSourceRoot()));
fileManager = new MemoryFileManager(loader, standardFileManager);
// TODO - this needs to be fixed so it can compile classes from the classpath otherwise can't include
// other .java resources from other modules
View on GitHub (pinned to fb308bd8c3)
Solutions
- Check the reported path for typos, missing files, or permission issues
- Run the process from a working directory where the source file is readable
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/impl/verticle/CompilingClassLoader.java:52 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06).
Data as JSON: /api/errors/fbe13fd3a04324cc.
Report an issue: GitHub.