{"record":{"id":"234fbb6813ebf890","repo":"apache/pulsar","slug":"no-function-s-found","errorCode":null,"errorMessage":"No Function %s found","messagePattern":"No Function (.+?) found","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java","lineNumber":805,"sourceCode":"        functionConfig.setNamespace(namespace);\n        functionConfig.setName(componentName);\n        WorkerConfig workerConfig = worker().getWorkerConfig();\n        FunctionConfigUtils.inferMissingArguments(\n                functionConfig, workerConfig.isForwardSourceMessageProperty());\n\n        String archive = functionConfig.getJar();\n        ValidatableFunctionPackage functionPackage = null;\n        // check if function is builtin and extract classloader\n        if (!StringUtils.isEmpty(archive)) {\n            if (archive.startsWith(org.apache.pulsar.common.functions.Utils.BUILTIN)) {\n                archive = archive.replaceFirst(\"^builtin://\", \"\");\n\n                FunctionsManager functionsManager = worker().getFunctionsManager();\n                FunctionArchive function = functionsManager.getFunction(archive);\n\n                // check if builtin function exists\n                if (function == null) {\n                    throw new IllegalArgumentException(String.format(\"No Function %s found\", archive));\n                }\n                functionPackage = function.getFunctionPackage();\n            }\n        }\n        boolean shouldCloseFunctionPackage = false;\n        try {\n            if (functionConfig.getRuntime() == FunctionConfig.Runtime.JAVA) {\n                // if function is not builtin, attempt to extract classloader from package file if it exists\n                if (functionPackage == null && componentPackageFile != null) {\n                    functionPackage =\n                            new FunctionFilePackage(componentPackageFile, workerConfig.getNarExtractionDirectory(),\n                                    workerConfig.getEnableClassloadingOfExternalFiles(), FunctionDefinition.class);\n                    shouldCloseFunctionPackage = true;\n                }\n\n                if (functionPackage == null) {\n                    throw new IllegalArgumentException(\"Function package is not provided\");\n                }","sourceCodeStart":787,"sourceCodeEnd":823,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/FunctionsImpl.java#L787-L823","documentation":"IllegalArgumentException (surfaced as HTTP 400 by the REST layer) thrown by validateUpdateRequestParams when functionConfig.getJar() references a built-in archive (builtin://<name>) but the worker's FunctionsManager has no registered built-in function with that name. The lookup functionsManager.getFunction(archive) returns null and validation aborts.","triggerScenarios":"registerFunction/updateFunction with a config whose jar is builtin://xyz where xyz is misspelled, not installed on the worker's functionsDirectory, or not visible after a failed reloadBuiltinFunctions.","commonSituations":"Function deployed against a worker whose narExtractionDirectory/functionsDirectory lacks the connector nar; built-in name differs between Pulsar versions (renames/removals); typo such as builtin://socket-source vs builtin://socket; workers started without --functionsDirectory containing the nar files.","solutions":["List available built-ins via GET /admin/v2/functions/builtin to see valid names, and correct the builtin:// name in the config.","Install the missing nar file into the worker's functionsDirectory and call reloadBuiltInFunctions (as superuser).","If the package is not meant to be built-in, upload the jar and pass its package URL instead of a builtin:// reference."],"exampleFix":"// before\nconfig.setJar(\"builtin://socket-sink\"); // not installed\n// after\nconfig.setJar(\"builtin://socket\"); // or upload custom jar and use its package URL","handlingStrategy":"validation","validationCode":"String jar = functionConfig.getJar();\nif (jar != null && jar.startsWith(\"builtin://\")) {\n    String name = jar.replaceFirst(\"^builtin://\", \"\");\n    boolean ok = listBuiltins().stream().anyMatch(d -> d.getName().equals(name));\n    if (!ok) throw new IllegalArgumentException(\"builtin function not installed: \" + name);\n}","typeGuard":null,"tryCatchPattern":"try {\n    admin.registerFunction(cfg);\n} catch (ApiException e) {\n    if (e.code() == 400 && e.body().startsWith(\"No Function \")) {\n        // correct builtin name or install nar, then reloadBuiltInFunctions\n    }\n}","preventionTips":["Verify builtin:// names against GET /admin/v2/functions/builtin before deploying.","Ensure the worker's functionsDirectory contains the required nar files in every environment."],"tags":["rest","bad-request","builtin-functions","pulsar-functions"],"backgroundTag":"resource-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"}