{"record":{"id":"ab9aeb317e29e00f","repo":"quarkusio/quarkus","slug":"bean-has-an-identifier-annotation-with-an-empty","errorCode":null,"errorMessage":" bean  has an @Identifier annotation with an empty value","messagePattern":" bean  has an @Identifier annotation with an empty value","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/signals/deployment/src/main/java/io/quarkus/signals/deployment/SignalsProcessor.java","lineNumber":430,"sourceCode":"        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) {\n        if (capabilities.isPresent(Capability.VERTX)) {\n            return new ReceiverExecutorImplementationBuildItem(VERTX);\n        } else {\n            // Note that quarkus-virtual-threads does require quarkus-vertx,\n            // although it does not depend on the extension directly (to avoid the cycle)\n            return new ReceiverExecutorImplementationBuildItem(DEFAULT_BLOCKING);\n        }\n    }\n\n    @BuildStep","sourceCodeStart":412,"sourceCodeEnd":448,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/signals/deployment/src/main/java/io/quarkus/signals/deployment/SignalsProcessor.java#L412-L448","documentation":"Thrown by SignalsProcessor.readIdentifier when the @Identifier qualifier found on a signals component bean carries an empty string value. The processor uses the qualifier value as the bean's identifier for topological sorting of signal components; an empty identifier cannot key the idToBeans map, so the guard aborts the build naming the component type and bean. The message's leading placeholder is the componentTypeName prefixed at throw time.","triggerScenarios":"Using @Identifier with no value (e.g. @Identifier where the annotation's value member is empty) on an enricher/interceptor bean, or @Identifier(\"\") / @Identifier(\" \").","commonSituations":"Typing @Identifier and forgetting the value, or passing an externalized/empty constant.","solutions":["Provide a non-blank value: @Identifier(\"my-enricher\").","Check the constant/expression feeding the annotation value — it must be a compile-time non-blank string.","Ensure each component gets a unique, meaningful id."],"exampleFix":"// before\n@Identifier(\"\")\nclass MyEnricher implements Enricher { ... }\n\n// after\n@Identifier(\"my-enricher\")\nclass MyEnricher implements Enricher { ... }","handlingStrategy":"validation","validationCode":"Identifier id = componentClass.getAnnotation(Identifier.class);\nif (id == null || id.value().isBlank()) { throw new IllegalStateException(\"@Identifier must have a non-blank value on \" + componentClass); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never leave @Identifier's value empty or blank.","Avoid empty constants in annotation values; use literal ids.","Add a startup unit test validating all @Identifier values."],"tags":["quarkus","cdi","identifier","validation"],"backgroundTag":"empty-identifier-value","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"}