apache/seatunnel · error · FileConnectorException
COMMON_ERROR_CODE-1
COMMON_ERROR_CODE-1
Error message
Schema information is undefined or misconfigured, please check your configuration file.
What it means
setCatalogTable validates that the CatalogTable provided to XmlReadStrategy has non-empty field names and field types. If the schema declared in the configuration is empty or malformed, ILLEGAL_ARGUMENT is thrown.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/XmlReadStrategy.java:231
"Failed to initialize secure XML parser while reading file [" + filePath + "]",
e);
}
return saxReader;
}
@Override
public SeaTunnelRowType getSeaTunnelRowTypeInfo(String path) throws FileConnectorException {
throw new FileConnectorException(
CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,
"User must defined schema for xml file type");
}
@Override
public void setCatalogTable(CatalogTable catalogTable) {
SeaTunnelRowType rowType = catalogTable.getSeaTunnelRowType();
if (ArrayUtils.isEmpty(rowType.getFieldNames())
|| ArrayUtils.isEmpty(rowType.getFieldTypes())) {
throw new FileConnectorException(
CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,
"Schema information is undefined or misconfigured, please check your configuration file.");
}
String partitionPath = getPathForPartitionInference(null);
if (readColumns.isEmpty()) {
this.seaTunnelRowType = rowType;
this.seaTunnelRowTypeWithPartition = mergePartitionTypes(partitionPath, rowType);
} else {
if (readColumns.retainAll(Arrays.asList(rowType.getFieldNames()))) {
log.warn(
"The read columns configuration will be filtered by the schema configuration, this may cause the actual results to be inconsistent with expectations. This is due to read columns not being a subset of the schema, "
+ "maybe you should check the schema and read_columns!");
}
int[] indexes = new int[readColumns.size()];
String[] fields = new String[readColumns.size()];
SeaTunnelDataType<?>[] types = new SeaTunnelDataType[readColumns.size()];
for (int i = 0; i < readColumns.size(); i++) {View on GitHub (pinned to cf67b549a7)
Solutions
- Add at least one field under schema.fields in the source configuration.
- Verify field type names are valid SeaTunnel types (string, int, boolean, etc.).
- Check the schema is declared inside the correct source plugin block, not at job root level.
Example fix
// before
schema = {
fields {
}
}
// after
schema = {
fields {
id = int
name = string
}
} Defensive patterns
Strategy: validation
Validate before calling
List<String> names = schema.getFieldNames();
if (names == null || names.isEmpty()) throw new IllegalArgumentException("schema.fields must declare at least one field"); Try / catch
try {
strategy.setCatalogTable(catalogTable);
} catch (FileConnectorException e) {
if (e.getMessage().contains("Schema information is undefined")) {
throw new ConfigException("Fix schema.fields in source config", e);
}
throw e;
} Prevention
- Check the rendered config after template substitution — empty fields blocks silently become this error.
- Validate schema field type names against SeaTunnel supported types.
- Keep schema at the correct nesting level in the plugin block.
When it happens
Trigger: Called by createXmlReadStrategy/testXmlRead when catalogTable.getSeaTunnelRowType() has empty getFieldNames() or getFieldTypes().
Common situations: The schema block exists but contains no fields, fields are declared with invalid types so they parse to empty, or the schema option is nested at the wrong level of the HOCON config.
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
- COMMON_ERROR_CODE-11
- Schema config can not be empty
- Schema config need option [schema], please correct your conf
- Schema config can't contains both [fields] and [columns], pl
- INVALID_PRIMARY_KEY
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/563517d976d03d9b.
Report an issue: GitHub.