oracle/graal · error · IllegalArgumentException
Unsupported annotation member value: {}
Error message
Unsupported annotation member value: {} What it means
Error "Unsupported annotation member value: {}" thrown in oracle/graal.
Source
Thrown at espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java:707
case Boolean booleanValue -> primitiveAnnotationMemberValue(JavaConstant.forBoolean(booleanValue), arrayElement);
case Byte byteValue -> primitiveAnnotationMemberValue(JavaConstant.forByte(byteValue), arrayElement);
case Character charValue -> primitiveAnnotationMemberValue(JavaConstant.forChar(charValue), arrayElement);
case Short shortValue -> primitiveAnnotationMemberValue(JavaConstant.forShort(shortValue), arrayElement);
case Integer intValue -> primitiveAnnotationMemberValue(JavaConstant.forInt(intValue), arrayElement);
case Long longValue -> primitiveAnnotationMemberValue(JavaConstant.forLong(longValue), arrayElement);
case Float floatValue -> primitiveAnnotationMemberValue(JavaConstant.forFloat(floatValue), arrayElement);
case Double doubleValue -> primitiveAnnotationMemberValue(JavaConstant.forDouble(doubleValue), arrayElement);
case String stringValue -> access.getProviders().getConstantReflection().forString(stringValue);
case ResolvedJavaType typeValue -> access.getProviders().getConstantReflection().asJavaClass(typeValue);
case EnumElement enumElement -> guestEnumValue(enumElement, expectedType);
case AnnotationValue nestedAnnotation -> guestAnnotationValue(nestedAnnotation, expectedType);
case List<?> listValue -> guestArrayValue(listValue, expectedType, annotationClass, memberName);
case MissingType missingType -> access.invoke(access.com_oracle_truffle_espresso_vmaccess_guest_GuestAnnotationProxyBuilder_missingTypeProxy, null,
access.getProviders().getConstantReflection().forString(missingType.getTypeName()));
case ElementTypeMismatch typeMismatch -> access.invoke(access.com_oracle_truffle_espresso_vmaccess_guest_GuestAnnotationProxyBuilder_elementTypeMismatchProxy, null,
annotationClass, memberName, access.getProviders().getConstantReflection().forString(typeMismatch.getFoundType()));
case ErrorElement errorElement -> throw new IllegalArgumentException(errorElement.toString());
default -> throw new IllegalArgumentException("Unsupported annotation member value: " + value.getClass().getName());
};
}
/**
* Boxes a scalar primitive annotation member while leaving primitive array elements unboxed for
* guest array construction.
*/
private JavaConstant primitiveAnnotationMemberValue(JavaConstant primitive, boolean arrayElement) {
return arrayElement ? primitive : access.getProviders().getConstantReflection().boxPrimitive(primitive);
}
/**
* Resolves an enum element in the guest context, preserving a missing constant as a deferred
* guest exception proxy.
*/
private JavaConstant guestEnumValue(EnumElement enumElement, JavaType expectedType) {
ResolvedJavaType enumType = enumElement.enumType;
if (!(expectedType instanceof ResolvedJavaType expectedEnumType) || !expectedEnumType.equals(enumType)) {View on GitHub (pinned to a66e9ccd1d)
Solutions
- Fix the condition reported by the error: Unsupported annotation member value: {}
- Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call.
Example fix
Validate inputs and environment so that the failing condition does not occur: Unsupported annotation member value: {} When it happens
Trigger: Thrown at espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java:707 when the library encounters an invalid state.
Common situations: Occurs when a caller violates the contract guarded by this check: Unsupported annotation member value: {}
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/73056beaaa9d24a9.
Report an issue: GitHub.