{"record":{"id":"a5fc977543239dba","repo":"apache/seatunnel","slug":"init-file-storage-properties-is-empty","errorCode":null,"errorMessage":"init file storage properties is empty","messagePattern":"init file storage properties is empty","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/IMapFileStorage.java","lineNumber":356,"sourceCode":"            try {\n                if (requestFuture.isDone() || Boolean.TRUE.equals(requestFuture.get())) {\n                    success = true;\n                }\n            } catch (Exception e) {\n                log.error(\"wait for write status error\", e);\n            } finally {\n                RequestFutureCache.remove(entry.getKey());\n            }\n            if (!success) {\n                failures.add(entry.getValue());\n            }\n        }\n        return failures;\n    }\n\n    private void checkInitStorageProperties(Map<String, Object> properties) {\n        if (properties == null || properties.isEmpty()) {\n            throw new IllegalArgumentException(\"init file storage properties is empty\");\n        }\n        List<String> requiredProperties = Arrays.asList(BUSINESS_KEY, CLUSTER_NAME);\n        for (String requiredProperty : requiredProperties) {\n            if (!properties.containsKey(requiredProperty)) {\n                throw new IllegalArgumentException(\n                        \"init file storage properties is not contains \" + requiredProperty);\n            }\n        }\n    }\n}\n","sourceCodeStart":338,"sourceCodeEnd":367,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file/src/main/java/org/apache/seatunnel/engine/imap/storage/file/IMapFileStorage.java#L338-L367","documentation":"checkInitStorageProperties rejects initialization when the properties map passed to IMapFileStorage.initialize() is null or empty. The file-based IMap storage needs at least the business key and cluster name to locate its WAL directory, so empty properties are fatal at init time.","triggerScenarios":"Calling IMapStorageFactory.create()/initialize() with a null or empty properties map — e.g. seatunnel.yaml storage stanza missing, or programmatic creation with new HashMap<>().","commonSituations":"Incomplete seatunnel.yaml map storage configuration section; environment-specific config file not deployed; copy-paste dropped the imap-storage block.","solutions":["Add the required storage properties (business key and cluster name) to the engine storage config.","Check that seatunnel.yaml actually contains the imap file storage section and was picked up by the running process.","When initializing programmatically, populate the map with at least BUSINESS_KEY and CLUSTER_NAME before calling initialize."],"exampleFix":"// before\nMap<String, Object> props = new HashMap<>();\nstorage.initialize(props);\n// after\nMap<String, Object> props = new HashMap<>();\nprops.put(\"storage.businessKey\", \"seatunnel\");\nprops.put(\"cluster.name\", \"seatunnel-cluster\");\nstorage.initialize(props);","handlingStrategy":"validation","validationCode":"if (properties == null || properties.isEmpty()) {\n    throw new IllegalStateException(\"imap file storage properties must not be empty\");\n}","typeGuard":null,"tryCatchPattern":"try { storage.initialize(props); } catch (IllegalArgumentException e) { /* fix seatunnel.yaml storage section and re-init */ }","preventionTips":["Keep the imap storage block present in every environment's seatunnel.yaml","Validate storage config in CI/deployment scripts","Fail fast on empty maps before calling initialize"],"tags":["configuration","initialization","validation"],"backgroundTag":"missing-required-config","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"}