{"record":{"id":"e783345491ce300b","repo":"quarkusio/quarkus","slug":"failed-to-create-compiler","errorCode":null,"errorMessage":"Failed to create compiler","messagePattern":"Failed to create compiler","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/dev/IsolatedTestModeMain.java","lineNumber":58,"sourceCode":"    private final List<HotReplacementSetup> hotReplacementSetups = new ArrayList<>();\n    private static volatile CuratedApplication curatedApplication;\n    private static volatile AugmentAction augmentAction;\n\n    private RuntimeUpdatesProcessor setupRuntimeCompilation(DevModeContext context, Path applicationRoot)\n            throws Exception {\n        System.setProperty(\"quarkus.test.display-test-output\", \"true\");\n        if (!context.getAllModules().isEmpty()) {\n            ServiceLoader<CompilationProvider> serviceLoader = ServiceLoader.load(CompilationProvider.class);\n            List<CompilationProvider> compilationProviders = new ArrayList<>();\n            for (CompilationProvider provider : serviceLoader) {\n                compilationProviders.add(provider);\n                context.getAllModules().forEach(moduleInfo -> moduleInfo.addSourcePaths(provider.handledSourcePaths()));\n            }\n            QuarkusCompiler compiler;\n            try {\n                compiler = new QuarkusCompiler(curatedApplication, compilationProviders, context);\n            } catch (Exception e) {\n                throw new RuntimeException(\"Failed to create compiler\", e);\n            }\n            TestSupport testSupport = new TestSupport(curatedApplication, compilationProviders, context, DevModeType.TEST_ONLY);\n            RuntimeUpdatesProcessor processor = new RuntimeUpdatesProcessor(applicationRoot, context, compiler,\n                    DevModeType.TEST_ONLY, this::regenerateApplication,\n                    new BiConsumer<DevModeContext.ModuleInfo, String>() {\n                        @Override\n                        public void accept(DevModeContext.ModuleInfo moduleInfo, String s) {\n                        }\n                    }, new BiFunction<String, byte[], byte[]>() {\n                        @Override\n                        public byte[] apply(String s, byte[] bytes) {\n                            return ClassTransformingBuildStep.transform(s, bytes);\n                        }\n                    }, testSupport, deploymentProblem);\n\n            for (HotReplacementSetup service : ServiceLoader.load(HotReplacementSetup.class,\n                    curatedApplication.getOrCreateBaseRuntimeClassLoader())) {\n                hotReplacementSetups.add(service);","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/dev/IsolatedTestModeMain.java#L40-L76","documentation":"In IsolatedTestModeMain.setupRuntimeCompilation(), a QuarkusCompiler is constructed from the curated application, the compilation providers, and the dev mode context. If construction fails for any reason (missing toolchain, bad classpath, broken provider), the underlying exception is wrapped in a RuntimeException with message 'Failed to create compiler'.","triggerScenarios":"Starting Quarkus in continuous-test / test-only dev mode where new QuarkusCompiler(curatedApplication, compilationProviders, context) throws — typically due to invalid source paths or a JDK without the compiler module.","commonSituations":"Running tests with a JRE instead of a full JDK; malformed quarkus.test.* or module source path configuration in DevModeContext; broken compilation provider plugin.","solutions":["Run Quarkus with a full JDK (JAVA_HOME pointing to a JDK, not a JRE).","Inspect the 'Caused by' exception for the root cause (e.g. invalid path or missing dependency).","Fix the module source paths / project directories in the build plugin configuration.","Clean and rebuild the project to remove stale build outputs."],"exampleFix":"// before\nJAVA_HOME=/usr/lib/jvm/java-17-jre\n\n// after\nJAVA_HOME=/usr/lib/jvm/java-17-jdk  # includes javax.tools JavaCompiler","handlingStrategy":"validation","validationCode":"boolean jdkAvailable = javax.tools.ToolProvider.getSystemJavaCompiler() != null;\nif (!jdkAvailable) throw new IllegalStateException(\"Run with a full JDK\");","typeGuard":null,"tryCatchPattern":"try {\n    // start test mode\n} catch (RuntimeException e) {\n    if (\"Failed to create compiler\".equals(e.getMessage())) {\n        log.error(\"Root cause:\", e.getCause());\n    }\n}","preventionTips":["Always launch Quarkus dev/test mode with a JDK, not a JRE.","Validate module source paths in build plugin configuration.","Read the cause chain immediately instead of guessing."],"tags":["quarkus","compiler","dev-mode","testing"],"backgroundTag":"compiler-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}