{"record":{"id":"f8d0db8fa4d9fda1","repo":"apache/seatunnel","slug":"the-value-of-key-is-required","errorCode":null,"errorMessage":"The value of${key} is required","messagePattern":"The value of(.+?) is required","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalogLoader.java","lineNumber":131,"sourceCode":"                    && StringUtils.isBlank(user)\n                    && StringUtils.isBlank(password)) {\n                throw new IllegalArgumentException(\n                        \"paimon privilege is enabled, user and password is required\");\n            }\n            return catalog;\n        } catch (Exception e) {\n            throw new PaimonConnectorException(\n                    PaimonConnectorErrorCode.LOAD_CATALOG, e.getMessage(), e);\n        }\n    }\n\n    void checkConfiguration(Configuration configuration, String key) {\n        Iterator<Map.Entry<String, String>> entryIterator = configuration.iterator();\n        while (entryIterator.hasNext()) {\n            Map.Entry<String, String> entry = entryIterator.next();\n            if (entry.getKey().equals(key)) {\n                if (StringUtils.isBlank(entry.getValue())) {\n                    throw new IllegalArgumentException(\"The value of\" + key + \" is required\");\n                }\n                return;\n            }\n        }\n        throw new IllegalArgumentException(key + \" is required\");\n    }\n}\n","sourceCodeStart":113,"sourceCodeEnd":139,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalogLoader.java#L113-L139","documentation":"PaimonCatalogLoader.checkConfiguration iterates the Paimon Configuration and, when it finds the requested key but its value is blank (null/empty/whitespace), throws IllegalArgumentException \"The value of<key> is required\" (note the missing space, a literal string concatenation). It validates that a present-but-blank config entry is rejected.","triggerScenarios":"loadCatalog -> checkConfiguration(configuration, key) where the Paimon Configuration contains the key (e.g. a security/kerberos or metastore property) but the value is empty or whitespace, e.g. `security.kerberos.keytab = ` in paimon-conf.","commonSituations":"Template config files left with empty values; environment-variable substitution in paimon conf resolving to empty string; trailing whitespace-only values; a required property defined but never filled in during deployment.","solutions":["Open the Paimon configuration (paimon-conf-dir files) and set a non-blank value for the reported key.","Fix environment-variable/templating substitution so the value resolves to real content.","Remove the empty key entirely if it is optional, so checkConfiguration's required-key branch (or absence handling) applies appropriately.","Trim whitespace when generating the config programmatically."],"exampleFix":"// before (paimon conf)\nsecurity.kerberos.keytab = \n// after\nsecurity.kerberos.keytab = /etc/security/keytabs/etl.keytab","handlingStrategy":"validation","validationCode":"String val = configuration.getString(key, null);\nif (val == null || val.trim().isEmpty()) {\n    throw new ConfigValidationException(key + \" must be set to a non-blank value\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    loader.loadCatalog();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"The value of\")) {\n        String key = e.getMessage().substring(\"The value of\".length()).replace(\" is required\", \"\").trim();\n        LOG.error(\"set a non-blank value for {} in paimon conf\", key);\n    }\n    throw e;\n}","preventionTips":["Lint paimon conf files for empty values before deployment","Avoid templated placeholders that can resolve to empty strings","Trim generated config values","Remove optional keys entirely rather than leaving them blank"],"tags":["paimon","configuration","blank-value","validation"],"backgroundTag":"empty-required-field","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}