{"record":{"id":"fb59a4ad3bfbc9fa","repo":"apache/pulsar","slug":"unsupported-runtime","errorCode":null,"errorMessage":"Unsupported Runtime ","messagePattern":"Unsupported Runtime ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/process/ProcessRuntimeFactory.java","lineNumber":213,"sourceCode":"\n    @Override\n    public ProcessRuntime createContainer(InstanceConfig instanceConfig, String codeFile,\n                                          String originalCodeFileName,\n                                          String transformFunctionFile,\n                                          String originalTransformFunctionFileName,\n                                          Long expectedHealthCheckInterval) throws Exception {\n        String instanceFile = null;\n        switch (instanceConfig.getFunctionDetails().getRuntime()) {\n            case JAVA:\n                instanceFile = javaInstanceJarFile;\n                break;\n            case PYTHON:\n                instanceFile = pythonInstanceFile;\n                break;\n            case GO:\n                break;\n            default:\n                throw new RuntimeException(\"Unsupported Runtime \" + instanceConfig.getFunctionDetails().getRuntime());\n        }\n\n        // configure auth if necessary\n        if (authenticationEnabled) {\n            authProvider\n                    .ifPresent(functionAuthProvider -> functionAuthProvider.configureAuthenticationConfig(authConfig,\n                            Optional.ofNullable(getFunctionAuthData(\n                                    Optional.ofNullable(instanceConfig.getFunctionAuthenticationSpec())))));\n        }\n\n        return new ProcessRuntime(\n            instanceConfig,\n            instanceFile,\n            extraDependenciesDir,\n            narExtractionDirectory,\n            logDirectory,\n            codeFile,\n            transformFunctionFile,","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/process/ProcessRuntimeFactory.java#L195-L231","documentation":"ProcessRuntimeFactory.createContainer() switches on the function's declared runtime (FunctionDetails.Runtime) to pick the instance file; GO is intentionally a no-op here, but any other/unmapped runtime value (e.g. unknown enum from a newer client or a corrupted FunctionDetails) reaches default and throws RuntimeException('Unsupported Runtime ' + runtime).","triggerScenarios":"Calling createContainer for a function whose FunctionDetails.runtime is not JAVA, PYTHON, or GO as known by this worker version — typically a runtime enum value introduced by a newer Pulsar client/worker or a malformed submitted FunctionDetails.","commonSituations":"Submitting functions built with a newer Pulsar client to an older function worker; a PROTO/unknown runtime value sneaking into FunctionDetails; running GO functions on a setup where the switch was left empty and a fallback path misroutes; version-skew during rolling upgrades.","solutions":["Upgrade the function worker to a version that recognizes the function's runtime value.","Verify the function was built/submitted with the runtime field set to JAVA, PYTHON, or GO only.","Re-submit the function with a corrected runtime if a bad FunctionDetails was uploaded.","Align client and cluster versions during rolling upgrades to avoid enum skew."],"exampleFix":"// before (submitted with unsupported/unknown runtime)\nFunctionDetails.newBuilder().setRuntime(runtime)\n// after\nFunctionDetails.newBuilder().setRuntime(FunctionDetails.Runtime.JAVA) // JAVA | PYTHON | GO only","handlingStrategy":"validation","validationCode":"FunctionDetails.Runtime rt = instanceConfig.getFunctionDetails().getRuntime();\nif (rt != FunctionDetails.Runtime.JAVA && rt != FunctionDetails.Runtime.PYTHON && rt != FunctionDetails.Runtime.GO) {\n    throw new IllegalArgumentException(\"Runtime not supported by this worker: \" + rt);\n}","typeGuard":"boolean isSupportedRuntime(FunctionDetails.Runtime rt) {\n    return rt == FunctionDetails.Runtime.JAVA\n        || rt == FunctionDetails.Runtime.PYTHON\n        || rt == FunctionDetails.Runtime.GO;\n}","tryCatchPattern":"try {\n    container = factory.createContainer(instanceConfig, ...);\n} catch (RuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Unsupported Runtime\")) {\n        // upgrade worker or resubmit function with a supported runtime\n    }\n    throw e;\n}","preventionTips":["Pin function-submission client versions to the cluster version.","Only submit functions declaring JAVA, PYTHON, or GO runtime.","Validate FunctionDetails at submission time with a policy check.","Avoid custom tooling that writes raw runtime enum values."],"tags":["pulsar-functions","runtime","version-compatibility"],"backgroundTag":"unsupported-runtime-type","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"}