{"record":{"id":"fe0cac503cdb794a","repo":"quarkusio/quarkus","slug":"invalid-clientheaderparam-definition-unable-to-d","errorCode":null,"errorMessage":"Invalid @ClientHeaderParam definition, unable to determine class %s. Problematic interface: %s","messagePattern":"Invalid @ClientHeaderParam definition, unable to determine class (.+?)\\. 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":852,"sourceCode":"                                    fillHeader.load(n.getValue()));\n                        }\n                    });\n\n                } else if (n instanceof RestClientAnnotationExpressionParser.Accessible) {\n\n                    String accessibleName = n.getValue();\n                    MethodInfo headerFillingMethod;\n                    AccessibleType accessibleType = accessibleName.contains(\".\") ? AccessibleType.STATIC_METHOD\n                            : AccessibleType.INTERFACE_METHOD;\n                    if (accessibleType == AccessibleType.STATIC_METHOD) {\n                        // calling a static method\n                        int endOfClassName = accessibleName.lastIndexOf('.');\n                        String className = accessibleName.substring(0, endOfClassName);\n                        String staticMethodName = accessibleName.substring(endOfClassName + 1);\n\n                        ClassInfo clazz = index.getClassByName(DotName.createSimple(className));\n                        if (clazz == null) {\n                            throw new RestClientDefinitionException(String.format(\n                                    \"Invalid %s definition, unable to determine class %s. Problematic interface: %s\",\n                                    CLIENT_HEADER_PARAM, className, declaringClass));\n                        }\n                        headerFillingMethod = findMethod(clazz, declaringClass, staticMethodName,\n                                CLIENT_HEADER_PARAM.toString());\n                    } else {\n                        headerFillingMethod = findMethod(declaringClass, declaringClass, accessibleName,\n                                CLIENT_HEADER_PARAM.toString());\n                    }\n\n                    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())) {","sourceCodeStart":834,"sourceCodeEnd":870,"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#L834-L870","documentation":"When @ClientHeaderParam's value is a fully-qualified static method reference (e.g. \"com.example.Util#token\" or \"com.example.Util.token\"), the enricher resolves the class portion from the Jandex index. If the class is not in the index, it cannot determine where the method lives and throws at build time.","triggerScenarios":"value=\"com.example.Utils.token\" where com.example.Utils is not indexed (not in the application archive / missing from Jandex index), or a typo in the package/class name.","commonSituations":"Referencing a class from an unindexed jar or external module, wrong fully-qualified name after package refactor, or the class lives in a different module not part of the index.","solutions":["Correct the fully-qualified class name in the @ClientHeaderParam value","Ensure the class is part of the application (in an indexed module/source)","Use a plain method name only if it is a parameter reference (e.g. {param}) instead of a static method"],"exampleFix":"// before\n@ClientHeaderParam(name = \"Token\", value = \"com.exampel.Utils.token\")\n// after\n@ClientHeaderParam(name = \"Token\", value = \"com.example.Utils.token\")","handlingStrategy":"validation","validationCode":"// Ensure the referenced class exists and is loadable before annotating\nString ref = \"com.example.Utils\";\nClass.forName(ref); // throws ClassNotFoundException if name is wrong","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy fully-qualified names from the source file, don't type from memory","Keep value-provider classes in the application archive so they are indexed","Re-check package names after refactoring"],"tags":["rest-client","jandex","classpath"],"backgroundTag":"class-not-found-in-index","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"}