{"record":{"id":"7f91a96b5693f0e4","repo":"apache/pulsar","slug":"didn-t-find-s-in-built-in-functions","errorCode":null,"errorMessage":"Didn't find %s in built-in functions","messagePattern":"Didn't find (.+?) in built-in functions","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java","lineNumber":1514,"sourceCode":"    }\n\n    private Path getBuiltinArchivePath(String pkgPath, FunctionDetails.ComponentType componentType) {\n        String type = pkgPath.replaceFirst(\"^builtin://\", \"\");\n        if (!FunctionDetails.ComponentType.FUNCTION.equals(componentType)) {\n            Connector connector = worker().getConnectorsManager().getConnector(type);\n            if (connector != null) {\n                return connector.getArchivePath();\n            }\n            if (componentType != null) {\n                throw new IllegalStateException(\"Didn't find \" + type + \" in built-in connectors\");\n            }\n        }\n        FunctionArchive function = worker().getFunctionsManager().getFunction(type);\n        if (function != null) {\n            return function.getArchivePath();\n        }\n        if (componentType != null) {\n            throw new IllegalStateException(\"Didn't find \" + type + \" in built-in functions\");\n        }\n        throw new IllegalStateException(\"Didn't find \" + type + \" in built-in connectors or functions\");\n    }\n\n    @Override\n    public StreamingOutput downloadFunction(final String path, final AuthenticationParameters authParams) {\n\n        if (!isWorkerServiceAvailable()) {\n            throwUnavailableException();\n        }\n\n        if (worker().getWorkerConfig().isAuthorizationEnabled()) {\n            // to maintain backwards compatibility but still have authorization\n            String[] tokens = path.split(\"/\");\n            if (tokens.length == 4) {\n                String tenant = tokens[0];\n                String namespace = tokens[1];\n                String componentName = tokens[2];","sourceCodeStart":1496,"sourceCodeEnd":1532,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java#L1496-L1532","documentation":"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.","triggerScenarios":"downloadFunction/getFunctionArchive with type not present in the worker's functionsDirectory registry and not found among built-in connectors either.","commonSituations":"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.","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"],"exampleFix":"// before\noutputSpec: { type: \"my-custom-function\" }  // not installed\n// after\noutputSpec: { type: \"wordcount\" }  // or install the NAR into functionsDirectory","handlingStrategy":"validation","validationCode":"boolean known = admin.functions().getBuiltInFunctions().stream()\n    .anyMatch(f -> f.equalsIgnoreCase(type));\nif (!known) throw new IllegalStateException(\"type '\" + type + \"' is not an installed builtin function\");","typeGuard":null,"tryCatchPattern":"try { resolveArchive(type); } catch (IllegalStateException e) { log.error(\"builtin function missing: {} — deploy NAR to functionsDirectory\", type); }","preventionTips":["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"],"tags":["configuration","functions","builtin","pulsar-functions"],"backgroundTag":"builtin-connector-not-found","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}