quarkusio/quarkus · error · java.lang.IllegalStateException
Multiple parameter injectors found for parameter %s of route
Error message
Multiple parameter injectors found for parameter %s of route method %s declared on %s
What it means
Raised by ReactiveRoutesProcessor.validateRouteMethod when more than one ParameterInjector claims the same parameter. The processor collects injectors matching the parameter's type and annotations; multiple matches make the generated handler bytecode ambiguous (which injector should supply the value?), so validation aborts at build time with the parameter index, method and bean. Typically caused by overlapping custom injector extensions on a build classpath.
Source
Thrown at extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java:568
&& method.returnType().kind() == Kind.CLASS) {
throw new IllegalStateException(String.format(
"Route business method returning a Uni/Multi/CompletionStage must declare a type argument on the return type [method: %s, bean: %s]",
method, bean));
}
boolean canEndResponse = false;
int idx = 0;
int failureParams = 0;
for (Type paramType : params) {
Set<AnnotationInstance> paramAnnotations = Annotations.getParameterAnnotations(transformedAnnotations,
method, idx);
List<ParameterInjector> injectors = getMatchingInjectors(paramType, paramAnnotations, index);
if (injectors.isEmpty()) {
throw new IllegalStateException(String.format(
"No parameter injector found for parameter %s of route method %s declared on %s", idx,
method, bean));
}
if (injectors.size() > 1) {
throw new IllegalStateException(String.format(
"Multiple parameter injectors found for parameter %s of route method %s declared on %s",
idx, method, bean));
}
ParameterInjector injector = injectors.get(0);
if (injector.getTargetHandlerType() != null && !injector.getTargetHandlerType().equals(handlerType)) {
throw new IllegalStateException(String.format(
"HandlerType.%s is not legal for parameter %s of route method %s declared on %s",
injector.getTargetHandlerType(), idx, method, bean));
}
// A param injector may validate the parameter annotations
injector.validate(bean, method, routeAnnotation, paramType, paramAnnotations);
if (injector.canEndResponse) {
canEndResponse = true;
}
if (Route.HandlerType.FAILURE == handlerType && isThrowable(paramType, index)) {View on GitHub (pinned to e1c734241f)
Solutions
- Narrow the parameter's annotations so only one injector matches
- Remove or disable the conflicting custom ParameterInjector extension from the build
- Adjust the custom injector's matching logic to not overlap with built-in injectors
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at extensions/reactive-routes/deployment/src/main/java/io/quarkus/vertx/web/deployment/ReactiveRoutesProcessor.java:568 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/ffb839181f6297d3.
Report an issue: GitHub.