{"record":{"id":"2d0e91bed6d50548","repo":"quarkusio/quarkus","slug":"errormessage","errorCode":null,"errorMessage":"errorMessage","messagePattern":"errorMessage","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/dev/JavaCompilationProvider.java","lineNumber":106,"sourceCode":"        }\n\n        final DiagnosticCollector<JavaFileObject> diagnosticsCollector = new DiagnosticCollector<>();\n\n        final Iterable<? extends JavaFileObject> sources = this.fileManager.getJavaSources(filesToCompile);\n        final JavaCompiler.CompilationTask task = this.compiler.getTask(null, this.fileManager,\n                diagnosticsCollector, this.compilerFlags, null, sources);\n\n        final boolean compilationTaskSucceed = task.call();\n\n        if (LOG.isEnabled(Logger.Level.ERROR) || LOG.isEnabled(Logger.Level.WARN)) {\n            collectDiagnostics(diagnosticsCollector, (level, diagnostic) -> LOG.logf(level, \"%s, line %d in %s\",\n                    diagnostic.getMessage(null), diagnostic.getLineNumber(),\n                    diagnostic.getSource() == null ? \"[unknown source]\" : diagnostic.getSource().getName()));\n        }\n\n        if (!compilationTaskSucceed) {\n            final String errorMessage = extractCompilationErrorMessage(diagnosticsCollector);\n            throw new RuntimeException(errorMessage);\n        }\n    }\n\n    @Override\n    public void close() throws IOException {\n        if (this.fileManager != null) {\n            this.fileManager.close();\n            this.fileManager = null;\n        }\n    }\n\n    private void collectDiagnostics(final DiagnosticCollector<JavaFileObject> diagnosticsCollector,\n            final BiConsumer<Logger.Level, Diagnostic<? extends JavaFileObject>> callback) {\n        for (Diagnostic<? extends JavaFileObject> diagnostic : diagnosticsCollector.getDiagnostics()) {\n            Logger.Level level = diagnostic.getKind() == Diagnostic.Kind.ERROR ? Logger.Level.ERROR : Logger.Level.WARN;\n            if (level.equals(Logger.Level.WARN) && IGNORE_NAMESPACES.stream()\n                    .anyMatch(diagnostic.getMessage(null)::contains)) {\n                continue;","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/dev/JavaCompilationProvider.java#L88-L124","documentation":"JavaCompilationProvider.compile() collects diagnostics from the JavaCompiler compilation task. If the task did not succeed, it extracts a formatted compilation error message (file, line, message per diagnostic) and throws a RuntimeException whose message is that compilation error report. This is the standard 'your code did not compile' failure surfaced during live reload or continuous testing.","triggerScenarios":"Any javac compilation failure in sources being hot-reloaded or compiled at runtime: syntax errors, missing imports, unresolved symbols in modified files.","commonSituations":"Editing source code with a mistake during live reload; incomplete refactoring saved mid-way; code that compiles in the IDE with different annotation processing but fails in Quarkus's compiler.","solutions":["Read the error message: it names the source file, line number, and javac diagnostic.","Fix the compilation error in the indicated file and re-save to trigger recompilation.","If diagnostics mention missing symbols, run a full clean build of the module to refresh the classpath."],"exampleFix":"// before (src/main/java/Foo.java, line 12)\nString s = undeclaredVariable;\n\n// after\nString s = \"declared value\";","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    // save / reload\n} catch (RuntimeException e) {\n    // message is the javac diagnostic: parse file + line, fix source, re-save\n}","preventionTips":["Compile locally (mvn compile) before saving mid-refactor.","Keep IDE and Quarkus compiler settings consistent (Java version, annotation processing).","Fix errors from the first reported line onward; later errors are often cascades."],"tags":["quarkus","compilation","javac","live-reload"],"backgroundTag":"compilation-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}