{"record":{"id":"f3f6c362586ae9be","repo":"apache/seatunnel","slug":"hugegraphconnectorerrorcode-illegal-config-argumen-f3f6c3","errorCode":"HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT","errorMessage":"Mapping[%s/%s]: 'nullableKeys' and 'notNullableKeys' are mutually exclusive — set at most one.","messagePattern":"Mapping\\[(.+?)/(.+?)\\]: 'nullableKeys' and 'notNullableKeys' are mutually exclusive — set at most one\\.","errorType":"error_code","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/utils/SchemaValidator.java","lineNumber":173,"sourceCode":"\n    private void validateMapping(MappingConfig mapping) {\n        validateMappingConfig(mapping);\n        if (mapping.getType() == LabelType.VERTEX) {\n            validateVertexMapping(mapping);\n        } else {\n            validateEdgeMapping(mapping);\n        }\n    }\n\n    private void validateMappingConfig(MappingConfig mapping) {\n        E.checkNotNull(mapping.getType(), \"type\", \"mapping\");\n        E.checkNotNull(mapping.getLabel(), \"label\", \"mapping\");\n\n        // nullableKeys and notNullableKeys are two opposite ways to steer nullability of an\n        // auto-created label. Setting both is ambiguous — notNullableKeys is silently ignored once\n        // an explicit nullableKeys allow-list is present — so reject it up front instead.\n        if (!mapping.getNullableKeys().isEmpty() && !mapping.getNotNullableKeys().isEmpty()) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    String.format(\n                            \"Mapping[%s/%s]: 'nullableKeys' and 'notNullableKeys' are mutually \"\n                                    + \"exclusive — set at most one.\",\n                            mapping.getType(), mapping.getLabel()));\n        }\n\n        // `properties` (selected whitelist) and `ignored` (blacklist) are opposite ways to choose\n        // the property set; setting both is ambiguous.\n        if (!mapping.getProperties().isEmpty() && !mapping.getIgnored().isEmpty()) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    String.format(\n                            \"Mapping[%s/%s]: 'properties' (selected) and 'ignored' are mutually \"\n                                    + \"exclusive — set at most one.\",\n                            mapping.getType(), mapping.getLabel()));\n        }\n        validateSourceFields(mapping, mapping.getIgnored(), \"ignored\");","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/utils/SchemaValidator.java#L155-L191","documentation":"Thrown by SchemaValidator.validateMappingConfig when a mapping declares both nullableKeys and notNullableKeys. These are opposite ways to control nullability of an auto-created label; with an explicit nullableKeys allow-list present, notNullableKeys is silently ignored, so setting both is ambiguous and rejected up front.","triggerScenarios":"A Vertex/Edge mapping in the SeaTunnel HugeGraph sink config contains non-empty nullable_keys and non-empty not_nullable_keys lists at the same time; detected during validateConfigOnly or validateMapping.","commonSituations":"Merging configs from two sources that used different nullability styles; incrementally adding keys to both lists over time; copy-pasting a mapping and appending a not_nullable_keys section without removing nullable_keys.","solutions":["Remove the nullable_keys list and keep only not_nullable_keys","Remove the not_nullable_keys list and keep only nullable_keys","If keys overlap differently per label, split the mapping into separate mappings each using one style"],"exampleFix":"# before — both set\nnullable_keys = [\"age\", \"nickname\"]\nnot_nullable_keys = [\"name\"]\n# after — single style\nnot_nullable_keys = [\"name\"]","handlingStrategy":"validation","validationCode":"// Pre-check: nullable and not-nullable keys must not both be set\nif (!mapping.getNullableKeys().isEmpty() && !mapping.getNotNullableKeys().isEmpty()) {\n    throw new IllegalArgumentException(\"Set at most one of nullableKeys / notNullableKeys\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    job.execute();\n} catch (HugeGraphConnectorException e) {\n    if (HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT.equals(e.getErrorCode())\n            && e.getMessage().contains(\"mutually exclusive\")) {\n        // fix the HOCON config: keep only one of nullable_keys / not_nullable_keys\n    } else { throw e; }\n}","preventionTips":["Pick one nullability style for the whole project and stick to it","Validate configs with a linter before submission","Comment in config templates that the two options are exclusive"],"tags":["hugegraph","config-validation","nullable-keys","mutually-exclusive"],"backgroundTag":"mutually-exclusive-options","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"}