quarkusio/quarkus · error · UnsupportedOperationException
Unknown value of annotation member ${name}
Error message
Unknown value of annotation member ${name} What it means
When generating an annotation literal proxy, unknown methods invoked on the JDK Proxy are resolved against annotation members: instance values, then defaults from the index, then the annotation class default. If a method's name matches no annotation member and no default value can be found anywhere, invoke() throws this UnsupportedOperationException instead of returning garbage.
Source
Thrown at core/deployment/src/main/java/io/quarkus/deployment/recording/AnnotationProxyProvider.java:170
case "getAnnotationInstance" -> annotationInstance;
case "getDefaultValues" -> defaultValues;
case "getValues" -> values;
default -> {
MethodInfo member = annotationClass.firstMethod(name);
if (member != null) {
if (values.containsKey(name)) {
yield values.get(name);
}
if (annotationInstance.value(name) != null) {
yield annotationInstance.value(name).value();
}
if (defaultValues.containsKey(name)) {
yield defaultValues.get(name);
}
if (member.defaultValue() != null) {
yield member.defaultValue().value();
}
throw new UnsupportedOperationException("Unknown value of annotation member " + name);
}
throw new UnsupportedOperationException("Method " + method + " not implemented");
}
};
}
});
}
public A build(io.quarkus.gizmo2.ClassOutput classOutput) {
generatedLiterals.computeIfAbsent(annotationLiteral, generatedName -> {
Gizmo gizmo = Gizmo.create(classOutput)
.withDebugInfo(false)
.withParameters(false);
gizmo.class_(generatedName, cc -> {
ClassDesc annotationClassDesc = classDescOf(annotationInstance.name());
cc.extends_(GenericType.ofClass(AnnotationLiteral.class, TypeArgument.of(annotationClassDesc)));
cc.implements_(annotationClassDesc);
View on GitHub (pinned to e1c734241f)
Solutions
- Only call declared annotation members on the recorded annotation literal
- Ensure the annotation class is fully indexed so members/defaults resolve (see related 'Failed to index' error)
- Update Quarkus if the annotation legitimately has a member with a default that fails to resolve
Defensive patterns
Strategy: type-guard
Validate before calling
boolean hasMemberOrDefault(AnnotationInstance ai, String name) {
return ai.value(name) != null || ai.valueWithDefault(index, name) != null;
} Prevention
- Only invoke declared abstract members on recorded annotation literals
- Ensure annotation interfaces have defaults for optional members
- Keep annotation classes fully indexed
When it happens
Trigger: The generated proxy's InvocationHandler receives a call for a method that is not a member of the annotation interface and has no resolvable default — usually Object methods not specially handled, or a member lookup miss due to an incomplete Jandex ClassInfo.
Common situations: Calling toString/hashCode/equals-like or non-annotation methods on the recorded annotation proxy; annotation ClassInfo missing member data so default resolution fails.
Related errors
- Method ${method} not implemented
- Annotation instance ${annotationInstance} does not match ann
- The configuration ${clazz} is missing the @ConfigRoot annota
- Public method ${methodInfo} cannot be proxied as it is final
- Cannot use ${method} as a recorder method as the return type
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/11745159a96024c6.
Report an issue: GitHub.