apache/druid · error · IllegalArgumentException

Unknown loader type[ ]. Known types are

Error message

Unknown loader type[%s].  Known types are %s

What it means

UriCacheGenerator resolves a SearchableVersionedDataFinder based on the URI scheme of the configured uriPrefix/uri. If no registered puller handles that scheme, it throws this IAE listing the known schemes (e.g. file, http, s3), indicating a missing or misconfigured loader.

Solutions

  1. Set the lookup uri/uriPrefix to a scheme with a registered finder (file, http/https, s3, etc.).
  2. Load the extension providing the finder for your scheme (e.g. druid-s3-lookups) via druid.extensions.loadList.
  3. Print/inspect the known types in the error message and align your URI scheme with one of them.

Example fix

// before
"uriPrefix": "gs://my-bucket/lookups/"   // no gs finder registered
// after
"uriPrefix": "s3://my-bucket/lookups/"   // druid-s3-lookups loaded
Defensive patterns

Strategy: validation

Validate before calling

Set<String> knownSchemes = pullers.keySet();
if (!knownSchemes.contains(URI.create(lookupUri).getScheme())) throw new IllegalArgumentException("Unsupported scheme; known: " + knownSchemes);

Try / catch

try { scheduler.schedule(uriNamespace); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith("Unknown loader type")) { /* fix uri scheme or load extension */ } else { throw e; } }

Prevention

When it happens

Trigger: generateCache() computing pullers.get(originalUri.getScheme()) which returns null — i.e. the lookup URI uses a scheme with no registered URI finder extension.

Common situations: Typo in the URI scheme (gs:// vs s3://); missing druid-s3-lookups or other extension providing the finder; using an unsupported scheme like ftp://.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/9203aa1522fa2991. Report an issue: GitHub.

Appendix: source

Thrown at extensions-core/lookups-cached-global/src/main/java/org/apache/druid/server/lookup/namespace/UriCacheGenerator.java:79

  {
    this.pullers = pullers;
    this.maxMemory = runtimeInfo.getMaxHeapSizeBytes();
  }

  @Override
  @Nullable
  public String generateCache(
      final UriExtractionNamespace extractionNamespace,
      final CacheScheduler.EntryImpl<UriExtractionNamespace> entryId,
      @Nullable final String lastVersion,
      final CacheHandler cache
  ) throws Exception
  {
    final boolean doSearch = extractionNamespace.getUriPrefix() != null;
    final URI originalUri = doSearch ? extractionNamespace.getUriPrefix() : extractionNamespace.getUri();
    final SearchableVersionedDataFinder<URI> pullerRaw = pullers.get(originalUri.getScheme());
    if (pullerRaw == null) {
      throw new IAE(
          "Unknown loader type[%s].  Known types are %s",
          originalUri.getScheme(),
          pullers.keySet()
      );
    }
    if (!(pullerRaw instanceof URIDataPuller)) {
      throw new IAE(
          "Cannot load data from location [%s]. Data pulling from [%s] not supported",
          originalUri,
          originalUri.getScheme()
      );
    }
    final URIDataPuller puller = (URIDataPuller) pullerRaw;
    final URI uri;
    if (doSearch) {
      final Pattern versionRegex;

      if (extractionNamespace.getFileRegex() != null) {

View on GitHub (pinned to 9b90983fd2)