{"record":{"id":"cb86686fa07b5c55","repo":"apache/seatunnel","slug":"deploy-mode-not-support-mode","errorCode":null,"errorMessage":"deploy mode not support : ${MODE}","messagePattern":"deploy mode not support : (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"seatunnel-common/src/main/java/org/apache/seatunnel/common/config/Common.java","lineNumber":122,"sourceCode":"            try {\n                String path =\n                        Common.class\n                                .getProtectionDomain()\n                                .getCodeSource()\n                                .getLocation()\n                                .toURI()\n                                .getPath();\n                path = new File(path).getPath();\n                return Paths.get(path).getParent().getParent();\n            } catch (URISyntaxException e) {\n                throw new RuntimeException(e);\n            }\n        } else if (DeployMode.CLUSTER == MODE) {\n            return Paths.get(\"\");\n        } else if (DeployMode.RUN_APPLICATION == MODE) {\n            return Paths.get(FLINK_YARN_APPLICATION_PATH);\n        } else {\n            throw new IllegalStateException(\"deploy mode not support : \" + MODE);\n        }\n    }\n\n    public static Path appStarterDir() {\n        return appRootDir().resolve(\"starter\");\n    }\n\n    /** Plugin Root Dir */\n    public static Path pluginRootDir() {\n        return Paths.get(getSeaTunnelHome(), \"plugins\");\n    }\n\n    /** Plugin Connector Dir */\n    public static Path connectorDir() {\n        return Paths.get(getSeaTunnelHome(), \"connectors\");\n    }\n\n    /** lib Dir */","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-common/src/main/java/org/apache/seatunnel/common/config/Common.java#L104-L140","documentation":"Common.appRootDir() resolves the SeaTunnel installation root based on the active DeployMode (client/cluster/run-application). If MODE holds a value the switch does not recognize, it throws IllegalStateException naming the unsupported mode.","triggerScenarios":"Calling Common.appRootDir() (directly or via getSeaTunnelHome, appStarterDir, pluginTarball) when the -Dse... deploy mode system property was set to something other than CLIENT, CLUSTER, or RUN_APPLICATION.","commonSituations":"Typo or wrong-case value in the deploy mode property when launching from a custom launcher or test; an uninitialized MODE (default not applied) in embedded usage; custom deployment scripts passing an invented mode name.","solutions":["Set the deploy mode to a valid value: client, cluster, or run-application (e.g. -Dseatunnel.deploy.mode=client or the -e/-m/-a CLI flag)","Check for typos/case in the mode property being passed to the JVM","If embedding SeaTunnel, explicitly initialize Common with a supported DeployMode before resolving paths"],"exampleFix":"// before\njava -Dseatunnel.deploy.mode=claster ... # typo\n// after\njava -Dseatunnel.deploy.mode=cluster ...","handlingStrategy":"validation","validationCode":"String mode = System.getProperty(\"seatunnel.deploy.mode\");\nif (mode != null && !Set.of(\"client\",\"cluster\",\"run-application\").contains(mode)) throw new IllegalArgumentException(\"bad mode: \" + mode);","typeGuard":null,"tryCatchPattern":"try { Path root = Common.appRootDir(); } catch (IllegalStateException e) { // fall back to explicit SEATUNNEL_HOME }","preventionTips":["Always launch with a standard deploy mode flag (-e/-m/-a)","Validate the deploy-mode property in custom launch scripts","Initialize DeployMode explicitly when embedding SeaTunnel"],"tags":["configuration","deploy-mode","startup"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}