{"record":{"id":"9b073cdeb906711b","repo":"quarkusio/quarkus","slug":"invalid-clientheaderparam-definition-unable-to-d-9b073c","errorCode":null,"errorMessage":"Invalid @ClientHeaderParam definition, unable to determine target method '%s'. Problematic interface: %s","messagePattern":"Invalid @ClientHeaderParam definition, unable to determine target method '(.+?)'\\. Problematic interface: (.+?)","errorType":"exception","errorClass":"RestClientDefinitionException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-reactive/rest-client/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/MicroProfileRestClientEnricher.java","lineNumber":881,"sourceCode":"                    Type valueType = null;\n                    AtomicInteger parameterPosition = new AtomicInteger(-1);\n                    if (headerFillingMethod == null) {\n                        for (MethodParameterInfo parameter : declaringMethod.parameters()) {\n                            if (!accessibleName.equals(parameter.name())) {\n                                continue;\n                            }\n                            if (!isString(parameter.type())) {\n                                throw new RestClientDefinitionException(String.format(\n                                        \"Invalid %s definition, method parameter %s is not of String type. Problematic interface: %s\",\n                                        CLIENT_HEADER_PARAM, accessibleName, declaringClass));\n                            }\n                            accessibleType = AccessibleType.METHOD_PARAMETER;\n                            valueType = parameter.type();\n                            parameterPosition.set(parameter.position());\n                            break;\n                        }\n                        if (valueType == null) {\n                            throw new RestClientDefinitionException(String.format(\n                                    \"Invalid %s definition, unable to determine target method '%s'. Problematic interface: %s\",\n                                    CLIENT_HEADER_PARAM, accessibleName, declaringClass));\n                        }\n                    } else {\n                        valueType = headerFillingMethod.returnType();\n                    }\n\n                    Supplier<ResultHandle> supplier;\n                    if (accessibleType == AccessibleType.STATIC_METHOD) {\n                        supplier = new Supplier<ResultHandle>() {\n                            @Override\n                            public ResultHandle get() {\n\n                                if (headerFillingMethod.parametersCount() == 0) {\n                                    return fillHeader.invokeStaticMethod(headerFillingMethod);\n                                } else if (headerFillingMethod.parametersCount() == 1\n                                        && isString(headerFillingMethod.parameterType(0))) {\n                                    return fillHeader.invokeStaticMethod(headerFillingMethod, fillHeader.load(headerName));","sourceCodeStart":863,"sourceCodeEnd":899,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-reactive/rest-client/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/MicroProfileRestClientEnricher.java#L863-L899","documentation":"The @ClientHeaderParam value string did not resolve to a static method on an indexed class, and it also does not match any parameter of the annotated client method. The enricher cannot determine the value target, so it throws at build time.","triggerScenarios":"value=\"{token}\" where no parameter named token exists on the client method (missing @PathParam or wrong name), or a method-name reference whose declaring class lookup failed earlier leaving valueType null.","commonSituations":"Typos in parameter placeholders, renaming a method parameter without updating the annotation value, or forgetting that the placeholder must exactly match the parameter name.","solutions":["Make the placeholder exactly match a String parameter name of the client method","Ensure the referenced parameter exists (add it or correct the name)","If referencing a static method, verify the class is indexed and the reference format is correct"],"exampleFix":"// before\n@ClientHeaderParam(name = \"X-User\", value = \"{usr}\")\nString get(@PathParam(\"id\") String userId);\n// after\n@ClientHeaderParam(name = \"X-User\", value = \"{userId}\")\nString get(@PathParam(\"id\") String userId);","handlingStrategy":"validation","validationCode":"// Ensure the placeholder matches a parameter name\nString value = \"{userId}\";\nString wanted = value.substring(1, value.length() - 1);\nboolean found = java.util.Arrays.stream(method.getParameters())\n    .anyMatch(p -> p.getName().equals(wanted));\nif (!found) throw new IllegalStateException(\"No parameter \" + wanted);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match placeholder text exactly to parameter names","Update annotations whenever renaming client-method parameters","Compile with -parameters so names are reliably available"],"tags":["rest-client","microprofile","build-time"],"backgroundTag":"rest-client-param-method-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}