{"record":{"id":"fe41c76c14d5ba81","repo":"apache/seatunnel","slug":"illegal-config-argument-fe41c7","errorCode":"ILLEGAL_CONFIG_ARGUMENT","errorMessage":"'schema' cannot be combined with reading all labels (option 'label' omitted): a single schema cannot describe multiple labels. Set 'label' to use 'schema', or drop 'schema' to auto-discover every label.","messagePattern":"'schema' cannot be combined with reading all labels \\(option 'label' omitted\\): a single schema cannot describe multiple labels\\. Set 'label' to use 'schema', or drop 'schema' to auto-discover every label\\.","errorType":"error_code","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/source/HugeGraphSourceFactory.java","lineNumber":151,"sourceCode":"        final Map<String, LabelTableContext> contexts = labelContexts;\n        final HugeGraphSourceConfig cfg = sourceConfig;\n        return () ->\n                (SeaTunnelSource<T, SplitT, StateT>) new HugeGraphSource(tables, contexts, cfg);\n    }\n\n    /**\n     * Read-all mode: discover every label of {@code labelType} from the server and build one\n     * produced {@link CatalogTable} + one {@link LabelTableContext} per label. Rejects {@code\n     * schema}/{@code filter} (neither can describe multiple heterogeneous labels) and an empty\n     * graph up front. Returns the read-all {@link HugeGraphSourceConfig}.\n     */\n    private HugeGraphSourceConfig buildReadAllTables(\n            ReadonlyConfig options,\n            MappingConfig.LabelType labelType,\n            List<CatalogTable> catalogTables,\n            Map<String, LabelTableContext> labelContexts) {\n        if (options.getOptional(ConnectorCommonOptions.SCHEMA).isPresent()) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    \"'schema' cannot be combined with reading all labels (option 'label' omitted): \"\n                            + \"a single schema cannot describe multiple labels. Set 'label' to use \"\n                            + \"'schema', or drop 'schema' to auto-discover every label.\");\n        }\n        boolean hasFilter =\n                options.getOptional(HugeGraphSourceOptions.FILTER)\n                        .map(filter -> !filter.isEmpty())\n                        .orElse(false);\n        if (hasFilter) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    \"'filter' cannot be combined with reading all labels (option 'label' omitted): \"\n                            + \"a property-equality filter assumes the property exists on every \"\n                            + \"label. Set 'label' to use 'filter'.\");\n        }\n        HugeGraphClient client = new HugeGraphClient(HugeGraphConnectionConfig.of(options));\n        List<String> labels;","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/source/HugeGraphSourceFactory.java#L133-L169","documentation":"When the HugeGraph source is configured to read ALL labels of a type (option 'label' omitted), it builds one CatalogTable per discovered label. An explicit 'schema' option describes a single label's columns, which is meaningless and ambiguous across multiple labels, so the factory rejects the combination up front with ILLEGAL_CONFIG_ARGUMENT.","triggerScenarios":"Running a HugeGraph source job without the 'label' option (all-labels read) while also setting 'schema' in the config; HugeGraphSourceFactory.createSource() calls buildReadAllTables(), which detects SCHEMA present and throws.","commonSituations":"Copy-pasting a single-label config and removing only 'label'; assuming 'schema' acts as a global schema override; migration from single-label configs to all-label reads.","solutions":["Remove the 'schema' option to let the connector auto-discover each label's columns.","Add a 'label' option to pin the read to a single label, then 'schema' becomes valid.","Split into multiple source jobs, one per label, each with its own 'label' and optional 'schema'."],"exampleFix":"// before\nsource {\n  HugeGraph {\n    schema = \"person-schema\"\n    # label omitted -> reads all labels\n  }\n}\n// after\nsource {\n  HugeGraph {\n    label = \"person\"\n    schema = \"person-schema\"\n  }\n}","handlingStrategy":"validation","validationCode":"// reject before submit\nif (config.schema != null && config.label == null) {\n  throw new IllegalArgumentException(\"'schema' requires 'label'\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  factory.createSource(config);\n} catch (HugeGraphConnectorException e) {\n  if (e.getErrorCode() == ILLEGAL_CONFIG_ARGUMENT) { /* fix config */ }\n}","preventionTips":["Only set 'schema' together with 'label'.","For multi-label reads, rely on auto-discovery instead of 'schema'.","Validate the HOCON config against option rules before submitting."],"tags":["config","source","schema","hugegraph"],"backgroundTag":"conflicting-config-options","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}