oracle/graal · error · IllegalArgumentException
Not a primitive kind:
Error message
Not a primitive kind:
What it means
Error "Not a primitive kind: " thrown in oracle/graal.
Source
Thrown at espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalVMAccess.java:956
JVMCIError.guarantee(name.charAt(0) == 'L' && name.charAt(name.length() - 1) == ';', "Invalid type: " + name);
Value meta = invokeJVMCIHelper("lookupInstanceType", name, accessingClass.getMetaObject(), resolve);
if (meta.isNull()) {
if (resolve) {
/*
* lookupInstanceType should throw for unresolved symbols when resolve is true. It
* can currently return null for symbols unknown to Espresso; see GR-76549 for fixing
* that in the guest helper.
*/
throw new LinkageError("Could not resolve type " + name);
}
return UnresolvedJavaType.create(name);
}
return new EspressoExternalResolvedInstanceType(this, meta);
}
EspressoExternalResolvedPrimitiveType forPrimitiveKind(JavaKind kind) {
if (!kind.isPrimitive()) {
throw new IllegalArgumentException("Not a primitive kind: " + kind);
}
return forPrimitiveBasicType(kind.getBasicType());
}
private EspressoExternalResolvedPrimitiveType forPrimitiveBasicType(int basicType) {
if (primitives[basicType] == null) {
throw new IllegalArgumentException("No primitive type for basic type " + basicType);
}
return primitives[basicType];
}
Value invokeJVMCIHelper(String method, Object... args) {
try {
return jvmciHelper.invokeMember(method, args);
} catch (PolyglotException e) {
throw throwHostException(e);
}
}View on GitHub (pinned to a66e9ccd1d)
Solutions
- Fix the condition reported by the error: Not a primitive kind:
- 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: Not a primitive kind:
When it happens
Trigger: Thrown at espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalVMAccess.java:956 when the library encounters an invalid state.
Common situations: Occurs when a caller violates the contract guarded by this check: Not a primitive kind:
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/e97d7e3645f76d1c.
Report an issue: GitHub.