{"record":{"id":"99205eeb186cabce","repo":"quarkusio/quarkus","slug":"unsupported-value-99205e","errorCode":null,"errorMessage":"Unsupported value: ","messagePattern":"Unsupported value: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AnnotationLiteralProcessor.java","lineNumber":324,"sourceCode":"                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_DOUBLE_ARRAY);\n                        } else if (ConstantDescs.CD_char.equals(componentType)) {\n                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_CHAR_ARRAY);\n                        } else if (ConstantDescs.CD_String.equals(componentType)) {\n                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_STRING_ARRAY);\n                        } else if (ConstantDescs.CD_Class.equals(componentType)) {\n                            yield bc.getStaticField(FieldDescs.ANNOTATION_LITERALS_EMPTY_CLASS_ARRAY);\n                        } else {\n                            yield bc.newEmptyArray(componentType, Const.of(0));\n                        }\n                    }\n                    default -> {\n                        // at this point, the only possible component kind is \"array\"\n                        throw new UnsupportedOperationException(\"Array component kind is \" + componentKind\n                                + \", this should never happen\");\n                    }\n                };\n            }\n            default -> throw new UnsupportedOperationException(\"Unsupported value: \" + annotationMemberValue);\n        };\n    }\n\n    private static ClassDesc componentTypeOf(MethodInfo annotationMember) {\n        assert annotationMember.returnType().kind() == Type.Kind.ARRAY;\n        return classDescOf(annotationMember.returnType().asArrayType().componentType());\n    }\n\n    // ---\n\n    private static String componentType(MethodInfo method) {\n        return componentTypeName(method).toString();\n    }\n\n    private static DotName componentTypeName(MethodInfo method) {\n        ArrayType arrayType = method.returnType().asArrayType();\n        return arrayType.constituent().name();\n    }","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AnnotationLiteralProcessor.java#L306-L342","documentation":"AnnotationLiteralProcessor.loadValue() converts a Jandex annotation member value into a runtime expression that builds an AnnotationLiteral. Its switch covers primitive types, String, Class, enum, and annotation component kinds; if the Jandex AnnotationValue has a kind outside that set, it throws UnsupportedOperationException. Reaching this indicates an unexpected/unsupported annotation member value kind in the CDI processing pipeline.","triggerScenarios":"An annotation used in bean metadata has a member whose Jandex value kind is not one of the handled kinds (e.g. nested/odd array component kind or a non-standard value type) when Arc builds annotation literal creation code during deployment.","commonSituations":"Custom annotations with unusual member types used on beans/interceptors/qualifiers; Jandex/JBoss-Classfile version changes introducing new value kinds; hand-written bytecode or bytecode transformations producing exotic annotation values.","solutions":["Inspect the annotation member at fault and change its type to a CDI-safe type (primitive, String, Class, enum, nested annotation, or array thereof)","Annotate non-binding complex members with @Nonbinding if the annotation is an interceptor binding/qualifier so the value is never rendered","Upgrade Quarkus/Arc — new value kinds are sometimes added in newer versions","If the annotation comes from a third-party library, avoid using it where Arc must synthesize a literal, or wrap/remove the member"],"exampleFix":"// before\n@interface MyBinding { ThreadLocal<String> weird(); }\n// after\n@interface MyBinding { @Nonbinding String value() default \"\"; }","handlingStrategy":"validation","validationCode":"for (AnnotationInstance ann : annotations) {\n    for (AnnotationValue v : ann.values()) {\n        if (!isSupportedKind(v.kind())) throw new IllegalStateException(\"Unsupported member: \" + v.name());\n    }\n}\nstatic boolean isSupportedKind(AnnotationValue.Kind k) {\n    return switch (k) {\n        case BOOLEAN, BYTE, SHORT, INT, LONG, FLOAT, DOUBLE, CHAR, STRING, CLASS, ENUM, NESTED, ARRAY -> true;\n        default -> false;\n    };\n}","typeGuard":"static boolean isSupportedAnnotationValue(AnnotationValue v) {\n    return v != null && isSupportedKind(v.kind());\n}","tryCatchPattern":"try { processor.loadValue(member, value); }\ncatch (UnsupportedOperationException e) { throw new DeploymentException(\"Bad annotation member \" + member, e); }","preventionTips":["Keep annotation members to CDI-legal types (primitive, String, Class, enum, nested annotation, arrays)","Mark complex members @Nonbinding on interceptor bindings/qualifiers","Test custom annotations with an ArC deployment early"],"tags":["cdi","arc","annotation-processing","build-time"],"backgroundTag":"unsupported-annotation-member-type","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}