{"record":{"id":"283daaa13c173e67","repo":"apache/seatunnel","slug":"illegal-config-argument-283daa","errorCode":"ILLEGAL_CONFIG_ARGUMENT","errorMessage":"Either 'mappings' or 'schema_config' must be specified. 'mappings' is the recommended option.","messagePattern":"Either 'mappings' or 'schema_config' must be specified\\. 'mappings' is the recommended option\\.","errorType":"validation","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/config/HugeGraphSinkConfig.java","lineNumber":197,"sourceCode":"        boolean hasSchemaConfig =\n                config.getOptional(HugeGraphSinkOptions.SCHEMA_CONFIG).isPresent();\n\n        if (hasMappings) {\n            if (hasSchemaConfig) {\n                LOG.warn(\n                        \"Both 'mappings' and 'schema_config' are present. \"\n                                + \"'schema_config' will be ignored. Please migrate to 'mappings'.\");\n            }\n            return config.get(HugeGraphSinkOptions.MAPPINGS);\n        }\n\n        if (hasSchemaConfig) {\n            SchemaConfig schemaConfig = config.get(HugeGraphSinkOptions.SCHEMA_CONFIG);\n            sinkConfig.setSchemaConfig(schemaConfig);\n            return Collections.singletonList(MappingConfig.fromLegacySchemaConfig(schemaConfig));\n        }\n\n        throw new HugeGraphConnectorException(\n                HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                \"Either 'mappings' or 'schema_config' must be specified. \"\n                        + \"'mappings' is the recommended option.\");\n    }\n\n    private static void applyMappingDefaults(List<MappingConfig> mappings) {\n        if (mappings == null) {\n            return;\n        }\n        for (MappingConfig m : mappings) {\n            if (m.getDateFormat() == null || m.getDateFormat().isEmpty()) {\n                m.setDateFormat(\"yyyy-MM-dd\");\n            }\n            // Leave timeZone unset when the user did not configure one; DataTypeUtil then falls\n            // back to ZoneId.systemDefault(), matching the HugeGraph Source. Hard-coding GMT+8\n            // here previously silently shifted absolute times by up to 8 hours when the Source\n            // ran on a JVM whose default zone was not Asia/Shanghai.\n        }","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/config/HugeGraphSinkConfig.java#L179-L215","documentation":"HugeGraphSinkConfig.resolveMappings() throws ILLEGAL_CONFIG_ARGUMENT when neither 'mappings' nor the legacy 'schema_config' option is present, since the sink cannot know how to map SeaTunnel rows onto HugeGraph vertices/edges without one of them. 'mappings' is the recommended, newer format.","triggerScenarios":"Building the sink config via of() with an empty or mappings-less options map that also lacks schema_config — e.g. an incomplete sink block or all mapping keys commented out.","commonSituations":"Users migrate docs/examples and delete schema_config without adding mappings, or copy a source config that has no mapping options at all.","solutions":["Add a 'mappings' list describing vertex/edge label mappings (recommended).","Alternatively supply the legacy 'schema_config' block if you are on an older setup.","Check that the option keys are not commented out or misnamed in the sink block."],"exampleFix":"// before\nHugeGraph {\n  host = \"hugegraph-server\"\n  graph_name = \"hugegraph\"\n  # no mappings or schema_config\n}\n// after\nHugeGraph {\n  host = \"hugegraph-server\"\n  graph_name = \"hugegraph\"\n  mappings = [\n    { source_vertex_label = \"person\", target_vertex_label = \"person\", edge_label = \"knows\" }\n  ]\n}","handlingStrategy":"validation","validationCode":"if (!opts.containsKey(HugeGraphSinkOptions.MAPPINGS) && !opts.containsKey(HugeGraphSinkOptions.SCHEMA_CONFIG)) { throw new IllegalArgumentException(\"Provide 'mappings' (recommended) or 'schema_config'\"); }","typeGuard":null,"tryCatchPattern":"// try { HugeGraphSinkConfig.of(opts); } catch (HugeGraphConnectorException e) {\n//   if (e.getMessage().contains(\"mappings\")) { /* add a mappings block before resubmitting */ } }","preventionTips":["Always define 'mappings' in new sink configs; prefer it over legacy schema_config","Check that mapping keys are not commented out in the job file","Validate job configs with a linter/pre-submit check that requires one of the two options"],"tags":["hugegraph","config","mappings","validation"],"backgroundTag":"missing-required-config-field","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"}