apache/pulsar · error · IllegalStateException
Didn't find %s in built-in functions
Error message
Didn't find %s in built-in functions
What it means
For FUNCTION component types (or after the connector lookup), the functions manager is consulted for a built-in function archive. If not found and componentType is non-null, IllegalStateException('Didn't find <type> in built-in functions') is thrown; with null componentType the message mentions both connectors and functions.
Source
Thrown at pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java:1514
}
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();
}
if (worker().getWorkerConfig().isAuthorizationEnabled()) {
// to maintain backwards compatibility but still have authorization
String[] tokens = path.split("/");
if (tokens.length == 4) {
String tenant = tokens[0];
String namespace = tokens[1];
String componentName = tokens[2];View on GitHub (pinned to 820761864e)
Solutions
- Place the built-in function NAR in the worker's functionsDirectory and restart
- Use a type from 'pulsar-admin functions available-functions'
- Upload your own function package and reference it instead of a builtin type
- Fix the type string typo
Example fix
// before
outputSpec: { type: "my-custom-function" } // not installed
// after
outputSpec: { type: "wordcount" } // or install the NAR into functionsDirectory Defensive patterns
Strategy: validation
Validate before calling
boolean known = admin.functions().getBuiltInFunctions().stream()
.anyMatch(f -> f.equalsIgnoreCase(type));
if (!known) throw new IllegalStateException("type '" + type + "' is not an installed builtin function"); Try / catch
try { resolveArchive(type); } catch (IllegalStateException e) { log.error("builtin function missing: {} — deploy NAR to functionsDirectory", type); } Prevention
- Install built-in function NARs in functionsDirectory
- Reference your own uploaded package instead of builtin types for custom code
- Confirm type names with pulsar-admin functions available-functions
- Keep functionsDirectory consistent across workers
When it happens
Trigger: downloadFunction/getFunctionArchive with type not present in the worker's functionsDirectory registry and not found among built-in connectors either.
Common situations: Built-in function NAR not placed in functionsDirectory; referencing a Java/Python function class name instead of a built-in function type; worker not configured to ship built-in functions.
Related errors
- Didn't find %s in built-in connectors
- You must specify either a Fully Qualified Function Name (FQF
- You must specify a name for the function or a Fully Qualifie
- Cannot specify both jar and function-type
- No Function name specified
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/7f91a96b5693f0e4.
Report an issue: GitHub.