{"record":{"id":"30206121c42e7ab6","repo":"apache/seatunnel","slug":"connector-jar-storage-mode-must-in-shared-isolat","errorCode":null,"errorMessage":"connector-jar-storage-mode must in [SHARED, ISOLATED]","messagePattern":"connector-jar-storage-mode must in \\[SHARED, ISOLATED\\]","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/service/jar/StorageStrategyFactory.java","lineNumber":41,"sourceCode":"import org.apache.seatunnel.engine.server.SeaTunnelServer;\n\npublic class StorageStrategyFactory {\n\n    public StorageStrategyFactory() {}\n\n    public static ConnectorJarStorageStrategy of(\n            ConnectorJarStorageMode connectorJarStorageMode,\n            ConnectorJarStorageConfig connectorJarStorageConfig,\n            SeaTunnelServer seaTunnelServer) {\n        switch (connectorJarStorageMode) {\n            case SHARED:\n                return new SharedConnectorJarStorageStrategy(\n                        connectorJarStorageConfig, seaTunnelServer);\n            case ISOLATED:\n                return new IsolatedConnectorJarStorageStrategy(\n                        connectorJarStorageConfig, seaTunnelServer);\n            default:\n                throw new IllegalArgumentException(\n                        ServerConfigOptions.MasterServerConfigOptions.CONNECTOR_JAR_STORAGE_MODE\n                                + \" must in [SHARED, ISOLATED]\");\n        }\n    }\n}\n","sourceCodeStart":23,"sourceCodeEnd":47,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/service/jar/StorageStrategyFactory.java#L23-L47","documentation":"StorageStrategyFactory.of maps the connector-jar-storage-mode master config to a storage strategy implementation (SHARED or ISOLATED). Any other enum value reaches the default branch and throws IllegalArgumentException telling the mode must be SHARED or ISOLATED. Since the value is an enum this normally indicates config parsing inconsistency rather than user typo, but the message surfaces the allowed set.","triggerScenarios":"Master node starting with connector-jar-storage-mode resolving to an unexpected value — e.g. a custom/legacy enum constant or a manually constructed ConnectorJarStorageConfig with an invalid mode.","commonSituations":"Version mismatch between config parsing code and the factory (enum gained/lost a constant); hand-built configuration in tests; patched builds where the option allowed another value previously.","solutions":["Set connector-jar-storage-mode = SHARED (default) or ISOLATED in the master server config","Align seatunnel-engine-server and seatunnel-engine-core jar versions so the enum matches","Remove custom overrides of the storage-mode enum from the classpath","If a new mode is needed, add a case to StorageStrategyFactory.of"],"exampleFix":"// before (config)\nconnector-jar-storage-mode = LOCAL\n// after\nconnector-jar-storage-mode = SHARED","handlingStrategy":"validation","validationCode":"String mode = config.get(\"connector-jar-storage-mode\");\nif (mode != null && !mode.equals(\"SHARED\") && !mode.equals(\"ISOLATED\")) throw new IllegalArgumentException(\"connector-jar-storage-mode must in [SHARED, ISOLATED]\");","typeGuard":"boolean isValidStorageMode(ConnectorJarStorageMode m) { return m == ConnectorJarStorageMode.SHARED || m == ConnectorJarStorageMode.ISOLATED; }","tryCatchPattern":"try { server.start(); } catch (IllegalArgumentException e) { log.error(\"Fix connector-jar-storage-mode in config: {}\", e.getMessage()); System.exit(1); }","preventionTips":["Only use SHARED or ISOLATED in seatunnel.yaml / master config","Keep engine module versions consistent","Validate config on startup with a clear error message"],"tags":["config","zeta","enum","connector-jar"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}