quarkusio/quarkus · error · DeploymentException
Unable to determine the client name from the parameter at po
Error message
Unable to determine the client name from the parameter at position ${position} in method ${class}#${method}() - compile the class with debug info enabled (-g) or parameter names recorded (-parameters), or use GrpcClient#value() to specify the service name What it means
When @GrpcClient is placed on a method parameter (CDI initializer) without an explicit value, Quarkus derives the client name from the parameter name, which requires debug info (-g) or -parameters compiler flags. When the parameter name is not recorded in the bytecode, deployment fails with this error.
Source
Thrown at extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcClientProcessor.java:166
for (InjectionPointInfo injectionPoint : beanDiscovery.getInjectionPoints()) {
AnnotationInstance clientAnnotation = injectionPoint.getRequiredQualifier(GrpcDotNames.GRPC_CLIENT);
if (clientAnnotation == null) {
continue;
}
Set<String> registeredInterceptors = getRegisteredInterceptors(injectionPoint);
String clientName;
AnnotationValue clientNameValue = clientAnnotation.value();
if (clientNameValue == null || clientNameValue.asString().equals(GrpcClient.ELEMENT_NAME)) {
// Determine the service name from the annotated element
if (clientAnnotation.target().kind() == Kind.FIELD) {
clientName = clientAnnotation.target().asField().name();
} else if (clientAnnotation.target().kind() == Kind.METHOD_PARAMETER) {
MethodParameterInfo param = clientAnnotation.target().asMethodParameter();
clientName = param.method().parameterName(param.position());
if (clientName == null) {
throw new DeploymentException("Unable to determine the client name from the parameter at position "
+ param.position()
+ " in method "
+ param.method().declaringClass().name() + "#" + param.method().name()
+ "() - compile the class with debug info enabled (-g) or parameter names recorded (-parameters), or use GrpcClient#value() to specify the service name");
}
} else {
// This should never happen because @GrpcClient has @Target({ FIELD, PARAMETER })
throw new IllegalStateException(clientAnnotation + " may not be declared at " + clientAnnotation.target());
}
} else {
clientName = clientNameValue.asString();
}
if (clientName.trim().isEmpty()) {
throw new DeploymentException(
"Invalid @GrpcClient `" + injectionPoint.getTargetInfo() + "` - client name cannot be empty");
}
View on GitHub (pinned to e1c734241f)
Solutions
- Add value to the annotation: @GrpcClient("service-name") on the parameter
- Compile with parameter names: set <parameters>true</parameters> (maven.compiler.parameters) or enable -g debug info
- Set maven-compiler-plugin <debug>true</debug> and <debuglevel>names</debuglevel>
- Move the injection to a field, where the field name is always available
Example fix
// before
@Inject
void setGreeter(@GrpcClient Greeter greeter) { ... }
// after
@Inject
void setGreeter(@GrpcClient("hello-service") Greeter greeter) { ... } Defensive patterns
Strategy: validation
Validate before calling
// annotate parameters explicitly instead of relying on -parameters
void setGreeter(@GrpcClient("hello-service") Greeter greeter) { ... }
// or verify build config: maven.compiler.parameters=true Prevention
- Always pass an explicit value to @GrpcClient on parameter injection
- Enable <parameters>true</parameters> in maven-compiler-plugin project-wide
- Prefer field injection where the name is always retained
When it happens
Trigger: A method like void setGreeter(@GrpcClient Greeter g) has no name recorded for the parameter at the given position: the class was compiled without -g and without -parameters, and @GrpcClient.value() was not set.
Common situations: Maven/Gradle builds that strip debug info (maven.compiler.debug=false); Kotlin/other-language compilation without parameter name retention; annotated methods in dependencies compiled elsewhere; IDE-compiled classes without -parameters.
Related errors
- Unable to derive the service interface for the generated Mut
- ${clientAnnotation} may not be declared at ${target}
- Invalid @GrpcClient `${targetInfo}` - client name cannot be
- A gRPC service injection is missing the @GrpcClient qualifie
- A gRPC service injection is missing the @GrpcClient qualifie
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/6c02f37cd0c0f5fa.
Report an issue: GitHub.