{"record":{"id":"beedabfcd1626706","repo":"quarkusio/quarkus","slug":"invalid-grpcclient-targetinfo-client-name","errorCode":null,"errorMessage":"Invalid @GrpcClient `${targetInfo}` - client name cannot be empty","messagePattern":"Invalid @GrpcClient `(.+?)` - client name cannot be empty","errorType":"validation","errorClass":"DeploymentException","httpStatus":null,"severity":"error","filePath":"extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcClientProcessor.java","lineNumber":181,"sourceCode":"                    MethodParameterInfo param = clientAnnotation.target().asMethodParameter();\n                    clientName = param.method().parameterName(param.position());\n                    if (clientName == null) {\n                        throw new DeploymentException(\"Unable to determine the client name from the parameter at position \"\n                                + param.position()\n                                + \" in method \"\n                                + param.method().declaringClass().name() + \"#\" + param.method().name()\n                                + \"() - compile the class with debug info enabled (-g) or parameter names recorded (-parameters), or use GrpcClient#value() to specify the service name\");\n                    }\n                } else {\n                    // This should never happen because @GrpcClient has @Target({ FIELD, PARAMETER })\n                    throw new IllegalStateException(clientAnnotation + \" may not be declared at \" + clientAnnotation.target());\n                }\n            } else {\n                clientName = clientNameValue.asString();\n            }\n\n            if (clientName.trim().isEmpty()) {\n                throw new DeploymentException(\n                        \"Invalid @GrpcClient `\" + injectionPoint.getTargetInfo() + \"` - client name cannot be empty\");\n            }\n\n            GrpcClientBuildItem item;\n            if (items.containsKey(clientName)) {\n                item = items.get(clientName);\n            } else {\n                item = new GrpcClientBuildItem(clientName);\n                items.put(clientName, item);\n            }\n\n            Type injectionType = injectionPoint.getRequiredType();\n            if (injectionType.name().equals(GrpcDotNames.CHANNEL)) {\n                item.addClient(new ClientInfo(GrpcDotNames.CHANNEL, ClientType.CHANNEL, registeredInterceptors));\n                continue;\n            }\n\n            // Clients supported: blocking stubs, Mutiny stubs, Mutiny client implementing the service interface","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/grpc/deployment/src/main/java/io/quarkus/grpc/deployment/GrpcClientProcessor.java#L163-L199","documentation":"The @GrpcClient annotation names a client configuration entry (quarkus.grpc.clients.<name>.*). A value consisting only of whitespace (or an empty string) is rejected because the client name is needed to look up configuration and register the client.","triggerScenarios":"@GrpcClient(\"\") or @GrpcClient(\"   \") is used on an injection point processed by discoverInjectedClients.","commonSituations":"Copy-pasted annotation with a placeholder left empty; config-driven name built from an empty property; refactoring that removed the name but left quotes.","solutions":["Set a non-empty client name: @GrpcClient(\"hello-service\")","Ensure any property/constant feeding the name resolves to a non-blank string at build time","Match the name to a quarkus.grpc.clients.<name> config block"],"exampleFix":"// before\n@Inject @GrpcClient(\"\") Greeter greeter;\n\n// after\n@Inject @GrpcClient(\"hello-service\") Greeter greeter;","handlingStrategy":"validation","validationCode":"String name = \"hello-service\";\nif (name == null || name.isBlank()) throw new IllegalStateException(\"@GrpcClient name must be non-blank\");\n// then: @GrpcClient(name)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never leave @GrpcClient value empty or whitespace","Match the name to an existing quarkus.grpc.clients.<name> config key","Define the client name as a named constant"],"tags":["grpc","cdi","configuration"],"backgroundTag":"empty-config-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}