{"record":{"id":"7ab30cf48fbedc86","repo":"quarkusio/quarkus","slug":"no-bean-type-found-for-bean","errorCode":null,"errorMessage":"No bean type found for: ${bean}","messagePattern":"No bean type found for: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ComponentsProviderGenerator.java","lineNumber":297,"sourceCode":"    private void generateAddBeans(String generatedName, Gizmo gizmo, CodeGenInfo info,\n            Map<BeanInfo, String> beanToGeneratedName) {\n        Set<BeanInfo> processed = new HashSet<>();\n\n        for (Container<BeanGroup> container : info.beans()) {\n            gizmo.class_(container.className(generatedName, ADD_BEANS), cc -> {\n                cc.final_();\n                for (BeanGroup group : container) {\n                    cc.staticMethod(ADD_BEANS + group.id(), mc -> {\n                        mc.packagePrivate();\n                        mc.returning(void.class);\n                        ParamVar beanIdToBean = mc.parameter(\"beanIdToBean\", Map.class);\n                        mc.body(bc -> {\n                            for (BeanInfo bean : group.beans()) {\n                                ClassDesc beanType = beanToGeneratedName.containsKey(bean)\n                                        ? ClassDesc.of(beanToGeneratedName.get(bean))\n                                        : null;\n                                if (beanType == null) {\n                                    throw new IllegalStateException(\"No bean type found for: \" + bean);\n                                }\n\n                                List<InjectionPointInfo> injectionPoints = bean.getInjections()\n                                        .stream()\n                                        .flatMap(i -> i.injectionPoints.stream())\n                                        .filter(ip -> !ip.isDelegate() && !BuiltinBean.resolvesTo(ip))\n                                        .toList();\n                                List<ClassDesc> params = new ArrayList<>();\n                                List<Expr> args = new ArrayList<>();\n\n                                if (bean.isProducer()) {\n                                    params.add(ClassDesc.of(Supplier.class.getName()));\n                                    if (processed.contains(bean.getDeclaringBean())) {\n                                        args.add(bc.withMap(beanIdToBean)\n                                                .get(Const.of(bean.getDeclaringBean().getIdentifier())));\n                                    } else {\n                                        // Declaring bean was not processed yet - use MapValueSupplier\n                                        args.add(bc.new_(MethodDescs.MAP_VALUE_SUPPLIER_CONSTRUCTOR, beanIdToBean,","sourceCodeStart":279,"sourceCodeEnd":315,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ComponentsProviderGenerator.java#L279-L315","documentation":"During ComponentsProvider generation, each bean must map to a generated bean class name (beanToGeneratedName). If a bean in a group has no entry — meaning no bean type class was generated for it — code generation cannot emit the addBean call and fails fast with IllegalStateException. This is an internal generator invariant, typically indicating a bug or inconsistent state upstream.","triggerScenarios":"generateAddBeans iterates group.beans() and calls beanToGeneratedName.containsKey(bean); a bean is absent from the map so beanType is null and the IllegalStateException is thrown.","commonSituations":"Custom extensions registering synthetic beans in unusual ways that skip bean-type generation; ArC processor bugs after Quarkus upgrades; build caches holding stale generated metadata after refactors.","solutions":["Clean rebuild (mvn clean install) to regenerate ArC components and clear stale state","Check the extension registering the bean ensures it contributes a proper bean type/generated class","Report/inspect as a possible ArC bug if reproducible on a minimal project; try a different Quarkus version"],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    quarkusBuild.start();\n} catch (IllegalStateException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"No bean type found for:\")) {\n        logger.errorf(\"Clean rebuild or report ArC bug: %s\", e.getMessage());\n    }\n    throw e;\n}","preventionTips":["Do a clean build after upgrading Quarkus","Avoid unsupported hacks when registering synthetic beans","Reproduce on minimal project and file an ArC issue if persistent"],"tags":["arc","codegen","build-time","internal"],"backgroundTag":"missing-generated-bean-type","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"}