{"record":{"id":"d0595a3644f092b5","repo":"quarkusio/quarkus","slug":"failed-to-build-aot-enhanced-container-image","errorCode":null,"errorMessage":"Failed to build AOT enhanced container image: ","messagePattern":"Failed to build AOT enhanced container image: ","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildAotEnhancedImageWorker.java","lineNumber":45,"sourceCode":"\n        try (CuratedApplication curatedApplication = createAppCreationContext()) {\n            Map<String, Object> context = Map.of(\n                    \"original-container-image\", originalContainerImage,\n                    \"container-working-directory\", containerWorkingDirectory,\n                    \"aot-file\", aotFile);\n\n            AugmentAction action = curatedApplication.createAugmentor(\n                    BuildAotEnhancedCustomizerProducer.class.getName(),\n                    context);\n\n            action.performCustomBuild(\n                    BuildEnhancedAotContainerImageCommandHandler.class.getName(),\n                    null,\n                    BuildAotOptimizedContainerImageResultBuildItem.class.getName());\n\n            LOGGER.info(\"AOT enhanced container image built successfully\");\n        } catch (BootstrapException e) {\n            throw new GradleException(\"Failed to build AOT enhanced container image: \" + e.getMessage(), e);\n        }\n    }\n}\n","sourceCodeStart":27,"sourceCodeEnd":49,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildAotEnhancedImageWorker.java#L27-L49","documentation":"BuildAotEnhancedImageWorker runs the Quarkus bootstrap in a Gradle worker to build an AOT-enhanced container image (used for AOT-optimized JVM container builds). When the bootstrap throws BootstrapException, the worker rethrows it as a GradleException, including e.getMessage(). It means the Quarkus application AOT container-image build step failed during bootstrap.","triggerScenarios":"Running an AOT container image build task (e.g. via quarkusBuild with AOT-enabled image building) where QuarkusBootstrap.builder(...).buildInitialRuntimeApplication() or running the build step chain throws BootstrapException — missing application model, bad configuration, or a failing build step.","commonSituations":"Invalid or missing quarkus.* configuration for AOT image building; classpath/application model resolution failure; unsupported plugin/extension combination for the AOT path; missing GraalVM/native-tooling-related config when invoking from Gradle worker.","solutions":["Read the BootstrapException message appended to this error — it names the failing build step or config key.","Validate quarkus.* config with ./gradlew quarkusShowEffectiveConfig or check for typos in build configuration.","Run the standard quarkusBuild first to confirm the base application build works before the AOT image path.","Update Quarkus Gradle plugin and extensions to matching versions (mixed versions often break bootstrap)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"./gradlew quarkusShowEffectiveConfig  # validate quarkus.* config before AOT build\n./gradlew quarkusBuild                   # confirm the base build succeeds first","typeGuard":null,"tryCatchPattern":"try {\n    ./gradlew buildAotEnhancedImage\n} catch (GradleException e) {\n    if (e.getMessage().startsWith(\"Failed to build AOT enhanced container image:\")) {\n        // act on the BootstrapException message embedded in the error text\n    }\n}","preventionTips":["Run the standard quarkusBuild first to validate config and the application model","Keep the Quarkus Gradle plugin, core, and all extensions on the same release version","Validate AOT/image-related quarkus.* properties before building","Pin Quarkus versions via the BOM to avoid mixed-version drift"],"tags":["gradle","aot","container-image","bootstrap"],"backgroundTag":"quarkus-bootstrap-failed","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"}