eclipse-vertx/vert.x · error · RuntimeException
Compilation failed!
Error message
Compilation failed!
What it means
Dynamic compilation failure in CompilingClassLoader: the JavaCompiler task reported failure for the verticle source. The 'Compilation failed!' RuntimeException signals the overall task.call() result; compiler diagnostics collected during the run are logged (warnings may be filtered) and identify the source errors.
Source
Thrown at vertx-core/src/main/java/io/vertx/core/impl/verticle/CompilingClassLoader.java:86
// TODO - this needs to be fixed so it can compile classes from the classpath otherwise can't include
// other .java resources from other modules
JavaFileObject javaFile = standardFileManager.getJavaFileForInput(StandardLocation.SOURCE_PATH, resolveMainClassName(), Kind.SOURCE);
JavaCompiler.CompilationTask task = javaCompiler.getTask(null, fileManager, diagnostics, null, null, Collections.singleton(javaFile));
boolean valid = task.call();
if (valid) {
for (Diagnostic<?> d : diagnostics.getDiagnostics()) {
String code = d.getCode();
if (code == null || (!code.startsWith("compiler.warn.annotation.method.not.found") &&
!"compiler.warn.proc.processor.incompatible.source.version".equals(code))) {
log.info(d);
}
}
} else {
for (Diagnostic<?> d : diagnostics.getDiagnostics()) {
log.warn(d);
}
throw new RuntimeException("Compilation failed!");
}
} catch (Exception e) {
throw new RuntimeException("Compilation failed", e);
}
}
public String resolveMainClassName() {
return javaSourceContext.getClassName();
}
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
byte[] bytecode = getClassBytes(name);
if (bytecode == null) {
throw new ClassNotFoundException(name);
}
return defineClass(name, bytecode, 0, bytecode.length);
}View on GitHub (pinned to fb308bd8c3)
Solutions
- Fix the reported Java compile errors in the verticle source
- Check diagnostics logged during compilation for the exact lines
- Pre-compile and deploy bytecode if runtime compilation is not required
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/impl/verticle/CompilingClassLoader.java:86 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/4feaccf31d44b8ca.
Report an issue: GitHub.