quarkusio/quarkus · error · IllegalStateException
Could not find indexed method: . with descriptor and arg ty
Error message
Could not find indexed method: . with descriptor and arg types
What it means
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.
Source
Thrown at extensions/panache/panache-common/deployment/src/main/java/io/quarkus/panache/common/deployment/visitors/PanacheEntityClassOperationGenerationVisitor.java:96
return byteCodeType != null
? byteCodeType.get()
: OBJECT.get();
};
}
@Override
public MethodVisitor visitMethod(int access, String methodName, String descriptor, String signature,
String[] exceptions) {
userMethods.add(methodName + "/" + descriptor);
MethodVisitor superVisitor = super.visitMethod(access, methodName, descriptor, signature, exceptions);
if (Modifier.isStatic(access)
&& Modifier.isPublic(access)
&& (access & Opcodes.ACC_SYNTHETIC) == 0
&& !methodCustomizers.isEmpty()) {
org.jboss.jandex.Type[] argTypes = AsmUtil.getParameterTypes(descriptor);
MethodInfo method = this.entityInfo.method(methodName, argTypes);
if (method == null) {
throw new IllegalStateException(
"Could not find indexed method: " + thisClass + "." + methodName + " with descriptor " + descriptor
+ " and arg types " + Arrays.toString(argTypes));
}
superVisitor = new PanacheMethodCustomizerVisitor(superVisitor, method, thisClass, methodCustomizers);
}
return superVisitor;
}
@Override
public void visitEnd() {
// FIXME: generate default constructor
for (MethodInfo method : panacheEntityBaseClassInfo.methods()) {
// Do not generate a method that already exists
String descriptor = method.descriptor();
if (!userMethods.contains(method.name() + "/" + descriptor)) {
AnnotationInstance bridge = method.annotation(PanacheConstants.DOTNAME_GENERATE_BRIDGE);
if (bridge != null) {View on GitHub (pinned to e1c734241f)
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.
Example fix
// before
// method only on base class, not indexed on entity
entity.someCustomizedMethod(arg)
// after
// override in the entity so it is indexed
class MyEntity : PanacheEntityBase() {
override fun someCustomizedMethod(arg: String) { super.someCustomizedMethod(arg) }
} Defensive patterns
Strategy: try-catch
Validate before calling
// verify the method exists on the entity's index before the call site runs
MethodInfo m = entityInfo.method(name, argTypes);
if (m == null) { /* log and skip customizer, or fail fast with clear context */ } Try / catch
try {
processMethodCall(methodName, descriptor);
} catch (IllegalStateException e) {
if (e.getMessage().startsWith("Could not find indexed method")) {
// fall back to plain visitor without customizer
} else throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Couldn't find id field of ${classInfo}
- Couldn't find id field of
- Companions are not supported in Java.
- Failed to process ${path}
- Failed to index: ${className}
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/f39aec1f1dbe1643.
Report an issue: GitHub.