{"record":{"id":"f8b9747d970b350e","repo":"quarkusio/quarkus","slug":"method-methoddescription-not-found","errorCode":null,"errorMessage":"Method \"\" + methodDescription + \"\" not found.","messagePattern":"Method \"\" \\+ methodDescription \\+ \"\" not found\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/funqy/funqy-server-common/runtime/src/main/java/io/quarkus/funqy/runtime/FunctionRegistry.java","lineNumber":35,"sourceCode":"\n        FunctionInvoker fi = functions.get(functionName);\n        if (fi != null) {\n            String otherMethodDescription = fi.targetClass.getName() + \"/\" + fi.method.getName()\n                    + getMethodDescriptor(fi.method);\n            String msg = String.format(\"Name conflict: the name \\\"%s\\\" is shared by \\\"%s\\\" and \\\"%s\\\".\" +\n                    \" Consider using @Func(\\\"name-here\\\") annotation parameter to distinguish them.\",\n                    functionName, methodDescription, otherMethodDescription);\n            log.warn(msg);\n        }\n\n        for (Method m : clz.getMethods()) {\n            if (m.getName().equals(methodName) && descriptor.equals(getMethodDescriptor(m))) {\n                functions.put(functionName, new FunctionInvoker(functionName, clz, m));\n                return;\n            }\n        }\n\n        throw new RuntimeException(\"Method \\\"\" + methodDescription + \"\\\" not found.\");\n    }\n\n    public FunctionInvoker matchInvoker(String name) {\n        return functions.get(name);\n    }\n\n    public Collection<FunctionInvoker> invokers() {\n        return functions.values();\n    }\n\n    private static String getDescriptorForClass(final Class c) {\n        if (c.isPrimitive()) {\n            if (c == byte.class)\n                return \"B\";\n            if (c == char.class)\n                return \"C\";\n            if (c == double.class)\n                return \"D\";","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/funqy/funqy-server-common/runtime/src/main/java/io/quarkus/funqy/runtime/FunctionRegistry.java#L17-L53","documentation":"FunctionRegistry.register() uses reflection to locate the exact method (name + JVM descriptor) recorded at build time. If no matching method exists on the class, a RuntimeException naming the method description is thrown during startup.","triggerScenarios":"The build-time recorded method signature no longer matches the runtime class: method renamed, parameter types changed, or class version mismatch between deployment scan and runtime.","commonSituations":"Hot-reload/hotswap artifacts where the compiled class changed after the registry was built; version skew between quarkus-funqy deployment and runtime artifacts; manual registry registration with a mistyped descriptor.","solutions":["Clean rebuild (mvn clean install) to re-sync build-time scan with compiled classes","Verify the method name and parameter types in the @Funq class haven't changed after the build","Check dependency versions of quarkus-funqy-* artifacts match","If registering manually, confirm the descriptor (parameter/return types) matches the method signature"],"exampleFix":"// before (method changed after build)\n@Funq public String greet(String name)\n// registry recorded greet(String) → method now greet(String, String)\n// after\nmvn clean install  // rebuild so registry and class match\n@Funq public String greet(String name) // keep signature stable","handlingStrategy":"validation","validationCode":"// Confirm the method exists before registration\nboolean found = Arrays.stream(clz.getDeclaredMethods())\n    .anyMatch(m -> m.getName().equals(methodName)\n        && FunctionRegistry.getMethodDescriptor(m).equals(expectedDescriptor));\nif (!found) throw new IllegalStateException(\"Registry/class mismatch for \" + methodDescription);","typeGuard":null,"tryCatchPattern":"try {\n    FunctionRegistry.register(clz, functionName, methodName, descriptor);\n} catch (RuntimeException e) {\n    if (e.getMessage().contains(\"not found\")) {\n        log.errorf(e, \"Class %s changed after build; clean rebuild required\", clz.getName());\n    }\n    throw e;\n}","preventionTips":["Run mvn clean install after changing @Funq method signatures","Keep quarkus-funqy deployment/runtime artifacts version-aligned","Avoid manual descriptor strings; generate them from live classes","Verify incremental hot-reload state after large refactors"],"tags":["quarkus","funqy","reflection","registry"],"backgroundTag":"method-not-found-reflective-lookup","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"}