oracle/graal · error · GraalError
Cannot find class %s during LibGraal JNIConfiguration regist
Error message
Cannot find class %s during LibGraal JNIConfiguration registration
What it means
Error "Cannot find class %s during LibGraal JNIConfiguration registration" thrown in oracle/graal.
Source
Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java:172
private Class<?> findClass(String name) {
String internalName = name;
if (name.startsWith("L") && name.endsWith(";")) {
internalName = name.substring(1, name.length() - 1);
}
var primitive = forPrimitive(internalName);
if (primitive != null) {
return primitive;
}
try {
return Class.forName(internalName, false, loader);
} catch (ClassNotFoundException e) {
String externalName = internalName.replace('/', '.');
try {
return Class.forName(externalName, false, loader);
} catch (ClassNotFoundException e3) {
// ignore
}
throw new GraalError(e, "Cannot find class %s during LibGraal JNIConfiguration registration", name);
}
}
private void check(boolean condition, String format, Object... args) {
if (!condition) {
throw error(format, args);
}
}
private GraalError error(String format, Object... args) {
Path path = configFilePath;
configFilePath = null; // prevent deletion
String errorMessage = format.formatted(args);
String errorLine = lines.get(lineNo - 1);
throw new GraalError("Line %d of %s: %s%n%s%n%s generated by command: %s",
lineNo, path.toAbsolutePath(), errorMessage, errorLine, path, quotedCommand);
}View on GitHub (pinned to a66e9ccd1d)
Solutions
- Fix the condition reported by the error: Cannot find class {} during LibGraal JNIConfiguration registration
- 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: Cannot find class {} during LibGraal JNIConfiguration registration When it happens
Trigger: Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java:172 when the library encounters an invalid state.
Common situations: Occurs when a caller violates the contract guarded by this check: Cannot find class {} during LibGraal JNIConfiguration registration
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/15f52b9bb4b9d7a7.
Report an issue: GitHub.