{"record":{"id":"ec07293d450adf1e","repo":"quarkusio/quarkus","slug":"bean-has-no-target","errorCode":null,"errorMessage":" bean has no target: ","messagePattern":" bean has no target: ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/signals/deployment/src/main/java/io/quarkus/signals/deployment/SignalsProcessor.java","lineNumber":420,"sourceCode":"                        beforeEdges.put(id, List.of(beforeValue.asStringArray()));\n                    }\n                    AnnotationValue afterValue = orderAnnotation.value(\"after\");\n                    if (afterValue != null) {\n                        afterEdges.put(id, List.of(afterValue.asStringArray()));\n                    }\n                }\n            }\n        }\n\n        if (idToBeans.keySet().isEmpty()) {\n            return List.of();\n        }\n        return TopologicalSort.sort(idToBeans.keySet(), beforeEdges, afterEdges, componentTypeName);\n    }\n\n    private static String readIdentifier(BeanInfo bean, String componentTypeName) {\n        if (bean.getTarget().isEmpty()) {\n            throw new IllegalStateException(componentTypeName + \" bean has no target: \" + bean);\n        }\n        Optional<AnnotationInstance> identifier = bean.getQualifier(DotNames.IDENTIFIER);\n        if (identifier.isEmpty()) {\n            throw new IllegalStateException(\n                    componentTypeName + \" bean \" + bean.getBeanClass()\n                            + \" must be annotated with @io.smallrye.common.annotation.Identifier\");\n        }\n        AnnotationValue value = identifier.get().value();\n        if (value == null || value.asString().isBlank()) {\n            throw new IllegalStateException(\n                    componentTypeName + \" bean \" + bean.getBeanClass()\n                            + \" has an @Identifier annotation with an empty value\");\n        }\n        return value.asString();\n    }\n\n    @BuildStep\n    ReceiverExecutorImplementationBuildItem supportedExecutionModels(Capabilities capabilities) {","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/signals/deployment/src/main/java/io/quarkus/signals/deployment/SignalsProcessor.java#L402-L438","documentation":"readIdentifier needs the bean's target (the method or class the bean resolves to) to read its annotations. A bean of the component SPI type with no target cannot be identified or ordered, so the build fails.","triggerScenarios":"A bean implementing the signals SPI type (enricher/interceptor) whose BeanInfo has an empty target — typically a synthetic/producer-derived bean with no concrete method or class target.","commonSituations":"Registering the SPI component via a producer method or synthetic bean extension rather than a plain bean class, which yields no target.","solutions":["Declare the component as a plain managed bean class implementing the SPI instead of a producer/synthetic bean.","If using a producer, ensure the produced type resolves to a target the container can inspect.","Check for an extension-generated bean and switch to a directly annotated class."],"exampleFix":"// before\n@Produces\nEnricher myEnricher() { return new MyEnricher(); }\n\n// after\n@Identifier(\"my-enricher\")\nclass MyEnricher implements Enricher { ... }","handlingStrategy":"validation","validationCode":"// Ensure the component is a plain managed bean class, not produced/synthetic:\nif (componentClass.isAnonymousClass() || componentClass.isLocalClass()) { throw new IllegalStateException(\"declare SPI component as a normal bean class\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Implement signals SPI components as concrete, directly annotated bean classes.","Avoid @Produces or synthetic bean definitions for ordered SPI components.","Check extension docs for the supported registration style."],"tags":["quarkus","cdi","bean-target","build-time"],"backgroundTag":"bean-has-no-target","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"}