quarkusio/quarkus · error · IllegalStateException
bean must be annotated with @io.smallrye.common.annotation
Error message
bean must be annotated with @io.smallrye.common.annotation.Identifier
What it means
Component beans (enrichers/interceptors) of the signals SPI must carry @io.smallrye.common.annotation.Identifier so the processor can key and order them. A bean implementing the SPI without that qualifier is rejected at build time.
Source
Thrown at extensions/signals/deployment/src/main/java/io/quarkus/signals/deployment/SignalsProcessor.java:424
afterEdges.put(id, List.of(afterValue.asStringArray()));
}
}
}
}
if (idToBeans.keySet().isEmpty()) {
return List.of();
}
return TopologicalSort.sort(idToBeans.keySet(), beforeEdges, afterEdges, componentTypeName);
}
private static String readIdentifier(BeanInfo bean, String componentTypeName) {
if (bean.getTarget().isEmpty()) {
throw new IllegalStateException(componentTypeName + " bean has no target: " + bean);
}
Optional<AnnotationInstance> identifier = bean.getQualifier(DotNames.IDENTIFIER);
if (identifier.isEmpty()) {
throw new IllegalStateException(
componentTypeName + " bean " + bean.getBeanClass()
+ " must be annotated with @io.smallrye.common.annotation.Identifier");
}
AnnotationValue value = identifier.get().value();
if (value == null || value.asString().isBlank()) {
throw new IllegalStateException(
componentTypeName + " bean " + bean.getBeanClass()
+ " has an @Identifier annotation with an empty value");
}
return value.asString();
}
@BuildStep
ReceiverExecutorImplementationBuildItem supportedExecutionModels(Capabilities capabilities) {
if (capabilities.isPresent(Capability.VERTX)) {
return new ReceiverExecutorImplementationBuildItem(VERTX);
} else {
// Note that quarkus-virtual-threads does require quarkus-vertx,View on GitHub (pinned to e1c734241f)
Solutions
- Add @io.smallrye.common.annotation.Identifier("unique-id") to the bean class.
- Verify the bean actually implements the intended SPI; if not, remove the accidental implementation.
- Give each SPI implementation a distinct identifier string.
Example fix
// before
class MyEnricher implements Enricher { ... }
// after
@Identifier("my-enricher")
class MyEnricher implements Enricher { ... } Defensive patterns
Strategy: validation
Validate before calling
if (!componentClass.isAnnotationPresent(Identifier.class)) { throw new IllegalStateException(componentClass + " must be annotated with @Identifier"); } Prevention
- Always annotate SPI implementations with @Identifier at creation time.
- Add an ArchUnit or unit test asserting every Enricher/Interceptor impl carries @Identifier.
- Read extension upgrade notes when the annotation becomes mandatory.
When it happens
Trigger: A bean implements a signals SPI interface but is missing the @Identifier annotation entirely.
Common situations: Adding a new enricher/interceptor implementation and forgetting the required @Identifier annotation, or upgrading the extension which newly mandates it.
Related errors
- Multiple beans with the same @Identifier value detected: ;
- bean has an @Identifier annotation with an empty value
- Multiple @Inject constructors on ${theClass}
- Quarkus does not support CDI Full @Specializes annotation; t
- IllegalStateException wrapping ClassNotFoundException for ge
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/bfffbdb6afeb83b5.
Report an issue: GitHub.