{"record":{"id":"643bfa3bb8884be0","repo":"apache/pulsar","slug":"built-in-componenttype-is-not-available","errorCode":null,"errorMessage":"Built-in ${componentType} is not available","messagePattern":"Built-in (.+?) is not available","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java","lineNumber":1990,"sourceCode":"            try {\n                return FunctionCommon.extractFileFromPkgURL(functionPkgUrl);\n            } catch (Exception e) {\n                throw new IllegalArgumentException(String.format(\"Encountered error \\\"%s\\\" \"\n                                + \"when getting %s package from %s\", e.getMessage(),\n                        ComponentTypeUtils.toString(componentType), functionPkgUrl), e);\n            }\n        }\n    }\n\n    protected ValidatableFunctionPackage getBuiltinFunctionPackage(String archive) {\n        if (!StringUtils.isEmpty(archive)) {\n            if (archive.startsWith(org.apache.pulsar.common.functions.Utils.BUILTIN)) {\n                archive = archive.replaceFirst(\"^builtin://\", \"\");\n\n                FunctionArchive function = worker().getFunctionsManager().getFunction(archive);\n                // check if builtin connector exists\n                if (function == null) {\n                    throw new IllegalArgumentException(\"Built-in \" + componentType + \" is not available\");\n                }\n                return function.getFunctionPackage();\n            }\n        }\n        return null;\n    }\n}\n","sourceCodeStart":1972,"sourceCodeEnd":1998,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java#L1972-L1998","documentation":"This IllegalArgumentException is thrown by ComponentImpl when resolving a component archive URL that starts with the builtin:// scheme. The worker looks up the archive name in its configured functions/IO connector registry (getFunction); if no built-in connector or function with that name is installed on the worker, registration fails with this message. It means the referenced built-in archive does not exist on this worker's nar extraction/conf directory.","triggerScenarios":"Registering or updating a function/sink/source with functionConfig or archive set to 'builtin://<name>' where <name> is not present in the worker's configured connector/sink/source archives (workerConfig functions/connector/sink directories or the functions worker's built-in list).","commonSituations":"Typo in the built-in connector name (e.g. builtin://data-generator vs builtin://pubsub); deploying to a cluster whose worker does not ship the connector NAR; connector added after worker startup; case-sensitivity mismatch in the archive name.","solutions":["Verify the exact built-in name with 'pulsar-admin functions list-builtins' (or sources/sinks equivalents) and correct the archive string","Install the connector NAR into the worker's functions/connector directory and restart the functions worker","If the package is custom, upload the actual jar via --jar instead of using builtin://"],"exampleFix":"// before\nconfig.setArchive(\"builtin://data-generater\");\n// after\nconfig.setArchive(\"builtin://data-generator\");","handlingStrategy":"validation","validationCode":"String archive = cfg.getArchive();\nif (archive != null && archive.startsWith(\"builtin://\")) {\n    String name = archive.replaceFirst(\"^builtin://\", \"\");\n    java.util.Set<String> builtins = admin.functions().getBuiltInFunctions() != null\n        ? admin.functions().getBuiltInFunctions() : java.util.Collections.emptySet();\n    if (!builtins.contains(name)) throw new IllegalStateException(\"Built-in not installed: \" + name);\n}","typeGuard":"boolean isValidBuiltin(String archive, java.util.Set<String> installed) {\n    return archive != null && (!archive.startsWith(\"builtin://\")\n        || installed.contains(archive.replaceFirst(\"^builtin://\", \"\")));\n}","tryCatchPattern":"try { admin.functions().createFunction(...); }\ncatch (org.apache.pulsar.client.admin.PulsarAdminException e) {\n    if (String.valueOf(e.getMessage()).contains(\"is not available\")) {\n        // verify installed built-ins and retry with corrected archive\n    }\n}","preventionTips":["Run 'pulsar-admin functions list-builtins' (or getClusterList-builtins) before deploying","Keep worker connector/sink/source NAR directories in sync across environments","Use the same archive name spelling as shown in the built-ins listing"],"tags":["pulsar-functions","builtin-connector","configuration"],"backgroundTag":"builtin-component-not-available","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"}