oracle/graal · critical · GraalError

No %s providers found

Error message

No %s providers found

What it means

When no explicit configuration name is given, selectFactory auto-selects the highest-priority candidate from all CompilerConfigurationFactory providers discoverable on the classpath. If that list is empty it throws GraalError('No jdk.graal.compiler.hotspot.CompilerConfigurationFactory providers found'), meaning the Graal compiler jar's service-provider metadata is missing or the jar is broken.

Source

Thrown at compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/hotspot/CompilerConfigurationFactory.java:245

                    System.out.println("    " + candidate.name + " priority " + candidate.autoSelectionPriority);
                }
                HotSpotGraalServices.exit(0, runtime);
            } else if (value != null) {
                for (CompilerConfigurationFactory candidate : getAllCandidates()) {
                    if (candidate.name.equals(value)) {
                        // Selects highest priority candidate with specified name
                        factory = candidate;
                        break;
                    }
                }
                if (factory == null) {
                    throw new GraalError("Compiler configuration '%s' not found. Available configurations are: %s", value,
                                    getAllCandidates().stream().map(c -> c.name).distinct().collect(Collectors.joining(", ")));
                }
            } else {
                List<CompilerConfigurationFactory> candidates = getAllCandidates();
                if (candidates.isEmpty()) {
                    throw new GraalError("No %s providers found", CompilerConfigurationFactory.class.getName());
                }
                factory = candidates.getFirst();
            }
        }
        assert factory != null;

        ShowConfigurationLevel level = Options.ShowConfiguration.getValue(options);
        if (level != ShowConfigurationLevel.none && shownConfiguration.compareAndSet(0L, 1L)) {
            switch (level) {
                case info: {
                    printConfigInfo(factory);
                    break;
                }
                case verbose: {
                    printConfigVerbose(factory);
                    CompilerConfiguration config = factory.createCompilerConfiguration();
                    printPlan("High tier:", () -> config.createHighTier(options));
                    printPlan("Mid tier:", () -> config.createMidTier(options));

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Restore/repair the GraalVM installation or compiler jar so META-INF/services/jdk.graal.compiler.hotspot.CompilerConfigurationFactory is present
  2. If shading, use a merge-aware plugin (maven-shade ServicesResourceTransformer) to concatenate service files
  3. Work around by naming an explicit -Dgraal.CompilerConfiguration=<name> only if the classes really exist; otherwise fix packaging first
Defensive patterns

Strategy: fallback

Validate before calling

boolean providersVisible() {
    return ServiceLoader.load(CompilerConfigurationFactory.class).iterator().hasNext();
}

Prevention

When it happens

Trigger: Initializing HotSpotGraalRuntime with no -Dgraal.CompilerConfiguration set while ServiceLoader finds zero CompilerConfigurationFactory entries — typically a corrupted/incomplete compiler jar, a fat-jar/shading build that dropped META-INF/services entries, or a custom classloader that does not expose service metadata.

Common situations: Repackaging jdk.graal.compiler into an uber-jar without merging META-INF/services; running on a broken GraalVM install; test classpaths that include the compiler classes but not its service descriptors; exotic classloaders (OSGi-like) hiding provider files.

Related errors


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/baa6c2323e5a044f. Report an issue: GitHub.