{"record":{"id":"11745159a96024c6","repo":"quarkusio/quarkus","slug":"unknown-value-of-annotation-member-name","errorCode":null,"errorMessage":"Unknown value of annotation member ${name}","messagePattern":"Unknown value of annotation member (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/recording/AnnotationProxyProvider.java","lineNumber":170,"sourceCode":"                                case \"getAnnotationInstance\" -> annotationInstance;\n                                case \"getDefaultValues\" -> defaultValues;\n                                case \"getValues\" -> values;\n                                default -> {\n                                    MethodInfo member = annotationClass.firstMethod(name);\n                                    if (member != null) {\n                                        if (values.containsKey(name)) {\n                                            yield values.get(name);\n                                        }\n                                        if (annotationInstance.value(name) != null) {\n                                            yield annotationInstance.value(name).value();\n                                        }\n                                        if (defaultValues.containsKey(name)) {\n                                            yield defaultValues.get(name);\n                                        }\n                                        if (member.defaultValue() != null) {\n                                            yield member.defaultValue().value();\n                                        }\n                                        throw new UnsupportedOperationException(\"Unknown value of annotation member \" + name);\n                                    }\n                                    throw new UnsupportedOperationException(\"Method \" + method + \" not implemented\");\n                                }\n                            };\n                        }\n                    });\n        }\n\n        public A build(io.quarkus.gizmo2.ClassOutput classOutput) {\n            generatedLiterals.computeIfAbsent(annotationLiteral, generatedName -> {\n                Gizmo gizmo = Gizmo.create(classOutput)\n                        .withDebugInfo(false)\n                        .withParameters(false);\n                gizmo.class_(generatedName, cc -> {\n                    ClassDesc annotationClassDesc = classDescOf(annotationInstance.name());\n                    cc.extends_(GenericType.ofClass(AnnotationLiteral.class, TypeArgument.of(annotationClassDesc)));\n                    cc.implements_(annotationClassDesc);\n","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/recording/AnnotationProxyProvider.java#L152-L188","documentation":"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.","triggerScenarios":"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.","commonSituations":"Calling toString/hashCode/equals-like or non-annotation methods on the recorded annotation proxy; annotation ClassInfo missing member data so default resolution fails.","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"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"boolean hasMemberOrDefault(AnnotationInstance ai, String name) {\n    return ai.value(name) != null || ai.valueWithDefault(index, name) != null;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only invoke declared abstract members on recorded annotation literals","Ensure annotation interfaces have defaults for optional members","Keep annotation classes fully indexed"],"tags":["annotation","proxy","recording","build-time"],"backgroundTag":"unknown-annotation-member","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"}