apache/seatunnel · error · Neo4jConnectorException

CONFIG_VALIDATION_FAILED

CONFIG_VALIDATION_FAILED

Error message

tables_configs[%d]: invalid 'schema' configuration

What it means

Neo4jSourceFactory.createNeo4jSource() builds each table's CatalogTable via CatalogTableUtil.buildWithConfig(tableConfig). If that parsing throws any RuntimeException (invalid schema fields, wrong types, malformed structure), it is rethrown as Neo4jConnectorException with CONFIG_VALIDATION_FAILED and a message pinpointing the failing index in tables_configs. It means the 'schema' block of that table config is not a valid SeaTunnel schema definition.

Source

Thrown at seatunnel-connectors-v2/connector-neo4j/src/main/java/org/apache/seatunnel/connectors/seatunnel/neo4j/source/Neo4jSourceFactory.java:133

        List<CatalogTable> catalogTables = new ArrayList<>(entries.size());
        List<Neo4jSourceTableConfig> tableConfigs = new ArrayList<>(entries.size());
        Set<String> tableIds = new HashSet<>();

        for (int i = 0; i < entries.size(); i++) {
            ReadonlyConfig tableConfig = ReadonlyConfig.fromMap(entries.get(i));
            String query = tableConfig.getOptional(Neo4jSourceOptions.KEY_QUERY).orElse(null);
            if (query == null || query.trim().isEmpty()) {
                throw configError(
                        String.format(
                                "tables_configs[%d]: 'query' must be configured and non-blank", i));
            }

            CatalogTable catalogTable;
            try {
                catalogTable = CatalogTableUtil.buildWithConfig(tableConfig);
            } catch (RuntimeException e) {
                throw new Neo4jConnectorException(
                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
                        String.format("tables_configs[%d]: invalid 'schema' configuration", i),
                        e);
            }

            String tableId = catalogTable.getTableId().toTablePath().toString();
            if (!tableIds.add(tableId)) {
                throw configError(
                        String.format(
                                "Duplicate schema.table '%s' found in tables_configs", tableId));
            }

            catalogTables.add(catalogTable);
            tableConfigs.add(
                    new Neo4jSourceTableConfig(query, catalogTable.getSeaTunnelRowType(), tableId));
        }

        Neo4jSourceQueryInfo connectionInfo =

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check the schema block for tables_configs[i]: ensure it uses `schema = { fields { name = string, ... } }` format with valid SeaTunnel data types
  2. Validate the config with the SeaTunnel config checker before submitting
  3. Copy a working schema example from Neo4j source docs and adapt field names/types
  4. Look at the cause exception in the log for the exact parse failure

Example fix

// before
schema { fields = ["name", "age"] }
// after
schema { fields { name = string age = int } }
Defensive patterns

Strategy: validation

Validate before calling

// validate schema block before submit: fields must be a map of name -> SeaTunnel type
boolean valid = schemaJson.has("fields") && schemaJson.get("fields").isObject();

Try / catch

try { /* submit job */ } catch (Neo4jConnectorException e) { if (e.getMessage().contains("invalid 'schema' configuration")) { fixSchemaConfig(); } throw e; }

Prevention

When it happens

Trigger: tables_configs[i].schema containing unsupported field types, missing 'fields' map, wrong structure (e.g. fields as a list instead of a map), or values that CatalogTableUtil cannot parse.

Common situations: Hand-editing schema YAML/HOCON with syntax slips; using types unsupported by the catalog (typo'd type names like 'str' instead of 'string'); copying a schema from a different connector with a different format.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/a16e49d6c374d2f9. Report an issue: GitHub.