apache/pulsar · error · IllegalStateException

Didn't find %s in built-in connectors

Error message

Didn't find %s in built-in connectors

What it means

When resolving an archive 'type' to a NAR file path, non-FUNCTION component types (source/sink) are looked up in the built-in connectors manager. If the type is not a known built-in connector and componentType is non-null, an IllegalStateException('Didn't find <type> in built-in connectors') is thrown.

Source

Thrown at pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java:1506

                            .log("Failed download package from packageManagement Service");

                }
            } else {
                WorkerUtils.downloadFromBookkeeper(worker().getDlogNamespace(), output, pkgPath);
            }
        };
    }

    private Path getBuiltinArchivePath(String pkgPath, FunctionDetails.ComponentType componentType) {
        String type = pkgPath.replaceFirst("^builtin://", "");
        if (!FunctionDetails.ComponentType.FUNCTION.equals(componentType)) {
            Connector connector = worker().getConnectorsManager().getConnector(type);
            if (connector != null) {
                return connector.getArchivePath();
            }
            if (componentType != null) {
                throw new IllegalStateException("Didn't find " + type + " in built-in connectors");
            }
        }
        FunctionArchive function = worker().getFunctionsManager().getFunction(type);
        if (function != null) {
            return function.getArchivePath();
        }
        if (componentType != null) {
            throw new IllegalStateException("Didn't find " + type + " in built-in functions");
        }
        throw new IllegalStateException("Didn't find " + type + " in built-in connectors or functions");
    }

    @Override
    public StreamingOutput downloadFunction(final String path, final AuthenticationParameters authParams) {

        if (!isWorkerServiceAvailable()) {
            throwUnavailableException();
        }

View on GitHub (pinned to 820761864e)

Solutions

  1. Install the connector NAR in the worker's connectorsDirectory and restart the worker
  2. Use the exact built-in connector type listed by 'pulsar-admin sources available-sinks/sources'
  3. Check for typos in the type parameter
  4. If using a custom archive, reference the archive file path instead of a builtin type

Example fix

// before
type: "kafkasink"
// after
type: "kafka"  // exact name from pulsar-admin sources available-sinks
Defensive patterns

Strategy: validation

Validate before calling

java.util.Optional<Connector> c = admin.sources().getBuiltInSources().stream()
    .filter(s -> s.getName().equalsIgnoreCase(type)).findFirst();
if (!c.isPresent()) throw new IllegalStateException("type '" + type + "' is not an installed builtin connector");

Try / catch

try { resolveArchive(type); } catch (IllegalStateException e) { log.error("builtin connector missing: {} — deploy NAR to connectorsDirectory", type); }

Prevention

When it happens

Trigger: Requesting the archive for a source/sink whose 'type' string is not a key in the worker's connectors registry (builtin connectors configured via connectorsDirectory or builtin connectors YAML).

Common situations: Connector NAR not deployed in the worker's connectors directory; type string mismatch (e.g. 'kafka' vs 'kafka-source'); custom connector never installed on the worker; typo in connector type in the sink/source config.

Related errors


AI-assisted analysis of apache/pulsar@820761864e (2026-09-06). Data as JSON: /api/errors/7e357ef6ce5ac6e0. Report an issue: GitHub.