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
- Install the connector NAR in the worker's connectorsDirectory and restart the worker
- Use the exact built-in connector type listed by 'pulsar-admin sources available-sinks/sources'
- Check for typos in the type parameter
- 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
- Deploy required connector NARs into the worker's connectorsDirectory
- Copy type strings from pulsar-admin available-sources/available-sinks outputs
- Version-pin connector NARs across worker instances
- Fall back to explicit archiveFile paths for custom connectors
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
- Didn't find %s in built-in functions
- Unknown component type: %s
- Access to environment variable %s is not allowed.
- PulsarAdmin is not enabled in function worker
- Getting consumer is not supported
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/7e357ef6ce5ac6e0.
Report an issue: GitHub.