{"record":{"id":"08a4bec28e32180b","repo":"oracle/graal","slug":"unsupported-annotation-member-type","errorCode":null,"errorMessage":"Unsupported annotation member type: {}","messagePattern":"Unsupported annotation member type: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java","lineNumber":972,"sourceCode":"        if (\"Ljava/lang/String;\".equals(expectedType.getName())) {\n            return value.asString();\n        }\n        if (\"Ljava/lang/Class;\".equals(expectedType.getName())) {\n            return EspressoExternalConstantReflectionProvider.classAsType(value, access);\n        }\n        if (!(expectedType instanceof ResolvedJavaType resolvedExpectedType)) {\n            throw new IllegalArgumentException(\"Expected resolved annotation member type, got \" + expectedType);\n        }\n        if (resolvedExpectedType.isArray()) {\n            return guestAnnotationArrayMemberValueAsHost(value, resolvedExpectedType);\n        }\n        if (resolvedExpectedType.isEnum()) {\n            return new EnumElement(resolvedExpectedType, value.invokeMember(\"name\").asString());\n        }\n        if (access.java_lang_annotation_Annotation.isAssignableFrom(resolvedExpectedType)) {\n            return guestAnnotationAsAnnotationValue(value);\n        }\n        throw new IllegalArgumentException(\"Unsupported annotation member type: \" + expectedType);\n    }\n\n    /**\n     * Recursively converts a typed guest annotation array to an immutable list of JVMCI element\n     * representations.\n     */\n    private Object guestAnnotationArrayMemberValueAsHost(Value value, ResolvedJavaType arrayType) {\n        ResolvedJavaType componentType = arrayType.getComponentType();\n        int length = Math.toIntExact(value.getArraySize());\n        List<Object> elements = new ArrayList<>(length);\n        for (int i = 0; i < length; i++) {\n            elements.add(guestAnnotationMemberValueAsHost(value.getArrayElement(i), componentType));\n        }\n        return List.copyOf(elements);\n    }\n\n}\n","sourceCodeStart":954,"sourceCodeEnd":990,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java#L954-L990","documentation":"Error \"Unsupported annotation member type: {}\" thrown in oracle/graal.","triggerScenarios":"Thrown at espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java:972 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Unsupported annotation member type: {}","solutions":["Fix the condition reported by the error: Unsupported annotation member type: {}","Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call."],"exampleFix":"Validate inputs and environment so that the failing condition does not occur: Unsupported annotation member type: {}","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}