apache/seatunnel · error · CassandraConnectorException
CONFIG_VALIDATION_FAILED
CONFIG_VALIDATION_FAILED
Error message
PluginName: %s, PluginType: %s, Message: %s
What it means
The entire validation block of CassandraSink is wrapped in a catch-all that rethrows any exception as CONFIG_VALIDATION_FAILED with the plugin name, type, and original message. So any error during sink setup (including the FIELD_NOT_IN_TABLE above, or session/connection errors during schema lookup) surfaces under this generic code.
Source
Thrown at seatunnel-connectors-v2/connector-cassandra/src/main/java/org/apache/seatunnel/connectors/seatunnel/cassandra/sink/CassandraSink.java:85
List<String> newFields = new ArrayList<>();
for (int i = 0; i < tableSchema.size(); i++) {
newFields.add(tableSchema.get(i).getName().asInternal());
}
this.cassandraParameters.setFields(newFields);
} else {
for (String field : fields) {
if (!tableSchema.contains(field)) {
throw new CassandraConnectorException(
CassandraConnectorErrorCode.FIELD_NOT_IN_TABLE,
"Field "
+ field
+ " does not exist in table "
+ pluginConfig.get(TABLE));
}
}
}
} catch (Exception e) {
throw new CassandraConnectorException(
SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,
String.format(
"PluginName: %s, PluginType: %s, Message: %s",
getPluginName(), PluginType.SINK, ExceptionUtils.getMessage(e)));
}
}
@Override
public String getPluginName() {
return "Cassandra";
}
@Override
public AbstractSinkWriter<SeaTunnelRow, Void> createWriter(SinkWriter.Context context)
throws IOException {
return new CassandraSinkWriter(
cassandraParameters, catalogTable.getSeaTunnelRowType(), tableSchema);
}View on GitHub (pinned to cf67b549a7)
Solutions
- Read the 'Message: ...' portion of the error — it embeds the underlying cause (e.g. field-not-in-table or connection error) and fix that root issue.
- Validate Cassandra connectivity and the table/keyspace in config before submitting the job.
- Correct the `fields`/`table`/`keyspace` config entries to match the actual Cassandra schema.
- Test the same CQL statements with cqlsh using identical credentials to isolate config vs environment problems.
Example fix
// before: connection timeout during validation due to wrong host hosts = ["localhost:9042"] // after: point to the actual reachable cluster hosts = ["cassandra-node1:9042", "cassandra-node2:9042"]
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-validate plugin config before submit: hosts reachable, keyspace/table exist
nc -z ${HOST} 9042 && cqlsh ${HOST} -e "DESCRIBE KEYSPACE ${KEYSPACE};" Try / catch
// this code wraps all validation errors — parse the embedded cause
try {
submit(cfg);
} catch (CassandraConnectorException e) {
log.error("Plugin validation failed, root cause: {}", e.getMessage(), e);
throw e;
} Prevention
- Read the 'Message:' suffix — it contains the real cause.
- Pre-validate Cassandra host/keyspace/table/fields before job submission.
- Keep configs generated from a single validated source of truth.
When it happens
Trigger: Any exception thrown inside the CassandraSink constructor's try block: schema retrieval failures, connection errors, field validation failures — caught and re-wrapped with "PluginName: %s, PluginType: %s, Message: %s".
Common situations: Misconfigured host/keyspace/table causing schema lookup to fail during plugin validation; invalid field lists; driver initialization problems; the real cause is in ExceptionUtils.getMessage(e) appended to the message.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- FIELD_NOT_IN_TABLE
- Condition operator must not be null
- AmazonDocumentDB option '' must not be blank
- AmazonDocumentDB option '' must be a valid BSON/JSON documen
- ILLEGAL_ARGUMENT
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/c337706e71cae48f.
Report an issue: GitHub.