{"record":{"id":"f39aec1f1dbe1643","repo":"quarkusio/quarkus","slug":"could-not-find-indexed-method-with-descriptor","errorCode":null,"errorMessage":"Could not find indexed method: . with descriptor  and arg types ","messagePattern":"Could not find indexed method: \\. with descriptor  and arg types ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/panache/panache-common/deployment/src/main/java/io/quarkus/panache/common/deployment/visitors/PanacheEntityClassOperationGenerationVisitor.java","lineNumber":96,"sourceCode":"            return byteCodeType != null\n                    ? byteCodeType.get()\n                    : OBJECT.get();\n        };\n    }\n\n    @Override\n    public MethodVisitor visitMethod(int access, String methodName, String descriptor, String signature,\n            String[] exceptions) {\n        userMethods.add(methodName + \"/\" + descriptor);\n        MethodVisitor superVisitor = super.visitMethod(access, methodName, descriptor, signature, exceptions);\n        if (Modifier.isStatic(access)\n                && Modifier.isPublic(access)\n                && (access & Opcodes.ACC_SYNTHETIC) == 0\n                && !methodCustomizers.isEmpty()) {\n            org.jboss.jandex.Type[] argTypes = AsmUtil.getParameterTypes(descriptor);\n            MethodInfo method = this.entityInfo.method(methodName, argTypes);\n            if (method == null) {\n                throw new IllegalStateException(\n                        \"Could not find indexed method: \" + thisClass + \".\" + methodName + \" with descriptor \" + descriptor\n                                + \" and arg types \" + Arrays.toString(argTypes));\n            }\n            superVisitor = new PanacheMethodCustomizerVisitor(superVisitor, method, thisClass, methodCustomizers);\n        }\n        return superVisitor;\n    }\n\n    @Override\n    public void visitEnd() {\n        // FIXME: generate default constructor\n\n        for (MethodInfo method : panacheEntityBaseClassInfo.methods()) {\n            // Do not generate a method that already exists\n            String descriptor = method.descriptor();\n            if (!userMethods.contains(method.name() + \"/\" + descriptor)) {\n                AnnotationInstance bridge = method.annotation(PanacheConstants.DOTNAME_GENERATE_BRIDGE);\n                if (bridge != null) {","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/panache/panache-common/deployment/src/main/java/io/quarkus/panache/common/deployment/visitors/PanacheEntityClassOperationGenerationVisitor.java#L78-L114","documentation":"While enhancing a Panache entity class, the visitor intercepts public non-synthetic method calls that Panache method customizers should apply to. It looks the method up in the Jandex index of the entity; if the method invoked at the call site is not found in the entity's indexed MethodInfo set, the augmentation fails with this IllegalStateException. This is an internal consistency check — index and bytecode are out of sync.","triggerScenarios":"visitMethod sees an instance method invocation, public, non-synthetic, with non-empty methodCustomizers, but entityInfo.method(methodName, argTypes) returns null — e.g. the call targets an inherited/default method or a synthetic variance that is not indexed on the entity.","commonSituations":"Calling a Panache customizer-annotated method inherited from a superclass or interface that isn't indexed on the entity; Jandex index missing due to build ordering; lambda/default-method desugaring producing descriptors that don't match the indexed method.","solutions":["Upgrade to the latest Quarkus patch version — several index/lookup mismatches in Panache customizer visitors have been fixed.","Ensure the invoked method is declared or indexed on the entity class; move/override the method in the entity if it lives only in a superclass or interface.","Exclude the call from enhancement by making it non-public or static if customizer tracking is not needed.","File a Quarkus issue with the entity, method name, descriptor, and argTypes from the message."],"exampleFix":"// before\n// method only on base class, not indexed on entity\nentity.someCustomizedMethod(arg)\n// after\n// override in the entity so it is indexed\nclass MyEntity : PanacheEntityBase() {\n    override fun someCustomizedMethod(arg: String) { super.someCustomizedMethod(arg) }\n}","handlingStrategy":"try-catch","validationCode":"// verify the method exists on the entity's index before the call site runs\nMethodInfo m = entityInfo.method(name, argTypes);\nif (m == null) { /* log and skip customizer, or fail fast with clear context */ }","typeGuard":null,"tryCatchPattern":"try {\n    processMethodCall(methodName, descriptor);\n} catch (IllegalStateException e) {\n    if (e.getMessage().startsWith(\"Could not find indexed method\")) {\n        // fall back to plain visitor without customizer\n    } else throw e;\n}","preventionTips":["Ensure Jandex indexing covers all entity superclasses/interfaces","Override inherited customized methods in the entity when needed","Keep Quarkus/Panache versions aligned; report mismatches upstream"],"tags":["panache","jandex","bytecode","build-time","method-index"],"backgroundTag":"indexed-method-lookup-failed","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"}