quarkusio/quarkus · error · IllegalStateException
No observer type found for: ${observerType}
Error message
No observer type found for: ${observerType} What it means
During observer registration in ComponentsProvider generation, each observer must have a generated class name in observerToGeneratedName. A missing entry means no observer type was generated, so the generator cannot emit the addObserver call and throws IllegalStateException. (Note: the throw passes the local ClassDesc variable observerType, which is null, instead of the observer — a minor message quirk.)
Source
Thrown at independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/ComponentsProviderGenerator.java:396
private void generateAddObservers(String generatedName, Gizmo gizmo, CodeGenInfo info,
Map<ObserverInfo, String> observerToGeneratedName) {
for (Container<ObserverGroup> container : info.observers()) {
gizmo.class_(container.className(generatedName, ADD_OBSERVERS), cc -> {
cc.final_();
for (ObserverGroup group : container) {
cc.staticMethod(ADD_OBSERVERS + group.id(), mc -> {
mc.packagePrivate();
mc.returning(void.class);
ParamVar beanIdToBean = mc.parameter("beanIdToBean", Map.class);
ParamVar observers = mc.parameter("observers", List.class);
mc.body(bc -> {
for (ObserverInfo observer : group.observers()) {
ClassDesc observerType = observerToGeneratedName.containsKey(observer)
? ClassDesc.of(observerToGeneratedName.get(observer))
: null;
if (observerType == null) {
throw new IllegalStateException("No observer type found for: " + observerType);
}
List<ClassDesc> params = new ArrayList<>();
List<Expr> args = new ArrayList<>();
if (!observer.isSynthetic()) {
List<InjectionPointInfo> injectionPoints = observer.getInjection().injectionPoints.stream()
.filter(ip -> !BuiltinBean.resolvesTo(ip))
.toList();
// declaring bean
params.add(ClassDesc.of(Supplier.class.getName()));
args.add(bc.withMap(beanIdToBean)
.get(Const.of(observer.getDeclaringBean().getIdentifier())));
// injections
for (InjectionPointInfo injectionPoint : injectionPoints) {
params.add(ClassDesc.of(Supplier.class.getName()));
args.add(bc.withMap(beanIdToBean).get(
Const.of(injectionPoint.getResolvedBean().getIdentifier())));
}View on GitHub (pinned to e1c734241f)
Solutions
- Clean rebuild (mvn clean install) to regenerate components
- Verify the extension registering the observer uses supported registration APIs
- If reproducible on a minimal project, report as an ArC bug or try another Quarkus version
Example fix
null
Defensive patterns
Strategy: try-catch
Try / catch
try {
quarkusBuild.start();
} catch (IllegalStateException e) {
if (e.getMessage() != null && e.getMessage().startsWith("No observer type found for:")) {
logger.errorf("Clean rebuild or report ArC bug: %s", e.getMessage());
}
throw e;
} Prevention
- Do a clean build after Quarkus version bumps
- Use supported extension APIs for observer registration
- File an ArC issue with a reproducer if the error persists
When it happens
Trigger: generateAddObservers iterates group.observers(); an ObserverInfo is absent from observerToGeneratedName, so observerType is null and the IllegalStateException is thrown.
Common situations: Synthetic observers registered by extensions without generated backing classes; stale incremental-build artifacts; ArC generator bugs after Quarkus version changes.
Related errors
- No bean type found for: ${bean}
- AnnotationTransformation is not an AnnotationsTransformer: <
- Invalid configuration value set for 'quarkus.arc.remove-unus
- Different default scopes defined for additional bean class:
- Unexpected value: <arcConfig.optimizeContexts()>
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/2d5374d28e10b5d5.
Report an issue: GitHub.