{"record":{"id":"c12ee93be83660b8","repo":"quarkusio/quarkus","slug":"multiple-extensions-registered-a-feature-of-the-sa","errorCode":null,"errorMessage":"Multiple extensions registered a feature of the same name: ${feature.getName()}","messagePattern":"Multiple extensions registered a feature of the same name: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/steps/MainClassBuildStep.java","lineNumber":336,"sourceCode":"                    ofMethod(RuntimeInfoProvider.class, \"register\", void.class, ValueRegistry.class, RuntimeSource.class),\n                    runtimeInfoProvider,\n                    valueRegistry,\n                    tryBlock.invokeStaticMethod(ofMethod(ConfigRuntimeSource.class, \"runtimeSource\", RuntimeSource.class)));\n        }\n\n        for (MainBytecodeRecorderBuildItem holder : mainMethod) {\n            writeRecordedBytecode(holder.getBytecodeRecorder(), holder.getGeneratedStartupContextClassName(), substitutions,\n                    recordableConstructorBuildItems,\n                    loaders, constants, gizmoOutput, startupContext, tryBlock);\n        }\n\n        tryBlock.invokeStaticMethod(RUNTIME_EXECUTION_RUNNING);\n\n        // Startup log messages\n        List<String> featureNames = new ArrayList<>();\n        for (FeatureBuildItem feature : features) {\n            if (featureNames.contains(feature.getName())) {\n                throw new IllegalStateException(\n                        \"Multiple extensions registered a feature of the same name: \" + feature.getName());\n            }\n            featureNames.add(feature.getName());\n        }\n        ResultHandle featuresHandle = tryBlock.load(featureNames.stream().sorted().collect(Collectors.joining(\", \")));\n        tryBlock.invokeStaticMethod(\n                ofMethod(Timing.class, \"printStartupTime\", void.class, String.class, String.class, String.class, String.class,\n                        List.class, boolean.class, boolean.class),\n                tryBlock.load(applicationInfo.getName()),\n                tryBlock.load(applicationInfo.getVersion()),\n                tryBlock.load(Version.getVersion()),\n                featuresHandle,\n                tryBlock.invokeStaticMethod(ofMethod(ConfigUtils.class, \"getProfiles\", List.class)),\n                tryBlock.load(LaunchMode.DEVELOPMENT.equals(launchMode.getLaunchMode())),\n                tryBlock.load(launchMode.isAuxiliaryApplication()));\n\n        tryBlock.invokeStaticMethod(\n                ofMethod(QuarkusConsole.class, \"start\", void.class));","sourceCodeStart":318,"sourceCodeEnd":354,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/steps/MainClassBuildStep.java#L318-L354","documentation":"Each extension normally registers one named FeatureBuildItem for logging/feature reporting. During main-class generation Quarkus collects all features for the startup log line; if two extensions registered a feature with the identical name the build fails fast with this IllegalStateException.","triggerScenarios":"During MainClassBuildStep.build, iterating features and finding the same feature name twice — two extensions (or one extension twice) produced FeatureBuildItems with equal names.","commonSituations":"Two different extensions picked the same feature name (often after a rename/merge); an application's custom build step registers a FeatureBuildItem whose name collides with an existing extension (e.g. 'hibernate'); including two forks of the same extension.","solutions":["Identify which extensions produce the duplicate name from the build output and remove one of the extensions/forks","If it's your own build step, rename the feature string to a unique value","Upgrade/align extension versions — older collisions are usually fixed in newer releases","Report/patch the offending third-party extension to use a distinct feature name"],"exampleFix":"// before (custom build step)\nreturn List.of(new FeatureBuildItem(\"hibernate\"));\n// after\nreturn List.of(new FeatureBuildItem(\"my-custom-hibernate-integration\"));","handlingStrategy":"validation","validationCode":"Set<String> names = new HashSet<>();\nfor (var f : features) {\n    if (!names.add(f.getName())) {\n        throw new IllegalStateException(\"Duplicate feature name: \" + f.getName());\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    quarkusBuild();\n} catch (IllegalStateException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Multiple extensions registered a feature\")) {\n        // inspect extensions for the duplicated feature name and remove/patch one\n    }\n    throw e;\n}","preventionTips":["Give custom FeatureBuildItems unique, project-prefixed names","Avoid including two forks of the same extension","Keep third-party extensions updated where name collisions were fixed","Grep your build steps for FeatureBuildItem names when adding extensions"],"tags":["quarkus","build-time","extensions","features"],"backgroundTag":"duplicate-feature-name","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"}