{"record":{"id":"a7ff91022ca2f32e","repo":"oracle/graal","slug":"cannot-find-partial-evaluation-configuration-s","errorCode":null,"errorMessage":"Cannot find partial evaluation configuration: %s","messagePattern":"Cannot find partial evaluation configuration: (.+?)","errorType":"exception","errorClass":"GraalError","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/TruffleCompilerImpl.java","lineNumber":206,"sourceCode":"    public static final MemUseTrackerKey CodeInstallationMemUse = DebugContext.memUseTracker(\"TruffleCodeInstallationMemUse\");\n\n    /**\n     * Creates a new {@link CompilationIdentifier} for {@code compilable}.\n     *\n     * Implementations of this method must guarantee that the {@link Verbosity#ID} for each returned\n     * value is unique.\n     */\n    public abstract TruffleCompilationIdentifier createCompilationIdentifier(TruffleCompilationTask task, TruffleCompilable compilable);\n\n    protected abstract DebugContext createDebugContext(OptionValues options, CompilationIdentifier compilationId, TruffleCompilable compilable, PrintStream logStream);\n\n    public static PartialEvaluatorConfiguration createPartialEvaluatorConfiguration(String name) {\n        for (PartialEvaluatorConfiguration candidate : GraalServices.load(PartialEvaluatorConfiguration.class)) {\n            if (candidate.name().equals(name)) {\n                return candidate;\n            }\n        }\n        throw new GraalError(\"Cannot find partial evaluation configuration: %s\", name);\n    }\n\n    @Override\n    @SuppressWarnings(\"try\")\n    public final void doCompile(TruffleCompilationTask task, TruffleCompilable compilable, TruffleCompilerListener listener) {\n        try (TruffleCompilation compilation = openCompilation(task, compilable)) {\n            doCompile(compilation, listener);\n        }\n    }\n\n    /**\n     * General options configured for the compiler. E.g. default values set with\n     * -Djdk.graal.OptionKey=value.\n     */\n    protected abstract OptionValues getGraalOptions();\n\n    /**\n     * Parse general options configured for the compiler, e.g. default values set with","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/truffle/TruffleCompilerImpl.java#L188-L224","documentation":"TruffleCompilerImpl.createPartialEvaluatorConfiguration(name) searches the PartialEvaluatorConfiguration implementations registered via ServiceLoader (GraalServices.load) and matches by name(); no match means the configuration name is unknown to this distribution, and GraalError is thrown.","triggerScenarios":"Calling createPartialEvaluatorConfiguration with a name that no registered PartialEvaluatorConfiguration reports: typo, wrong name string, or the provider class missing its META-INF/services registration in the jar.","commonSituations":"Passing a configuration name from documentation that doesn't match the registered name; custom PartialEvaluatorConfiguration built without a service-provider entry; upgrading a distribution where the configuration set changed.","solutions":["Enumerate the available configurations (iterate GraalServices.load(PartialEvaluatorConfiguration.class) and print name()) and use one of those exact names.","For a custom configuration, add META-INF/services/jdk.graal.compiler.truffle.PartialEvaluatorConfiguration containing your implementation class so ServiceLoader finds it.","Check for typos/case mismatch in the name string."],"exampleFix":"// before\nTruffleCompilerImpl.createPartialEvaluatorConfiguration(\"inlinied\"); // typo\n\n// after\nfor (PartialEvaluatorConfiguration c : GraalServices.load(PartialEvaluatorConfiguration.class)) {\n    System.out.println(c.name()); // pick the exact registered name\n}\nTruffleCompilerImpl.createPartialEvaluatorConfiguration(\"inlined\");","handlingStrategy":"validation","validationCode":"// List registered configurations and validate the name before calling\njava.util.Set<String> names = GraalServices.load(PartialEvaluatorConfiguration.class).stream()\n        .map(PartialEvaluatorConfiguration::name)\n        .collect(java.util.stream.Collectors.toSet());\nif (!names.contains(requestedName)) {\n    throw new IllegalArgumentException(\"Unknown config '\" + requestedName + \"'; available: \" + names);\n}\nTruffleCompilerImpl.createPartialEvaluatorConfiguration(requestedName);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Derive configuration names from the loaded services at runtime instead of hardcoding strings.","If you ship a custom configuration, always pair the implementation with its META-INF/services entry and a unit test that ServiceLoader finds it."],"tags":["graal","truffle","service-loader","configuration"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}