apache/seatunnel · error · SeaTunnelRuntimeException
COMMON-17
COMMON-17
Error message
'${identifier}' unsupported convert type '${dataType}' of '${field}' to SeaTunnel data type. What it means
Thrown by OracleTypeConverter.convert() when an Oracle column type cannot be mapped to a SeaTunnel data type. The converter handles known types (interval types map to STRING, NUMBER narrowing, TIMESTAMP variants, etc.); the default branch fires for unrecognized or unsupported Oracle type names. This fails schema conversion of the Oracle source before any data is read.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/oracle/OracleTypeConverter.java:282
case ORACLE_TIMESTAMP_WITH_TIME_ZONE:
case ORACLE_TIMESTAMP_WITH_LOCAL_TIME_ZONE:
// TIMESTAMP WITH (LOCAL) TIME ZONE is LTZ
builder.dataType(LocalTimeType.OFFSET_DATE_TIME_TYPE);
if (typeDefine.getScale() == null) {
builder.scale(TIMESTAMP_DEFAULT_SCALE);
} else {
builder.scale(typeDefine.getScale());
}
break;
case ORACLE_INTERVAL:
case ORACLE_INTERVAL_YEAR:
case ORACLE_INTERVAL_DAY:
case ORACLE_INTERVAL_YM:
case ORACLE_INTERVAL_DS:
builder.dataType(BasicType.STRING_TYPE);
break;
default:
throw CommonError.convertToSeaTunnelTypeError(
DatabaseIdentifier.ORACLE, oracleType, typeDefine.getName());
}
return builder.build();
}
@Override
public BasicTypeDefine reconvert(Column column) {
BasicTypeDefine.BasicTypeDefineBuilder builder =
BasicTypeDefine.builder()
.name(column.getName())
.nullable(column.isNullable())
.comment(column.getComment())
.defaultValue(column.getDefaultValue());
switch (column.getDataType().getSqlType()) {
case BOOLEAN:
builder.columnType(String.format("%s(%s)", ORACLE_NUMBER, 1));
builder.dataType(ORACLE_NUMBER);
builder.length(1L);View on GitHub (pinned to cf67b549a7)
Solutions
- Identify the unsupported Oracle type from '<dataType>' and the column from '<field>'.
- Exclude the column via explicit SELECT projection of supported columns.
- Cast in a custom query (e.g. XMLSERIALIZE / XMLCAST for XMLType, DBMS_LOB for BFILE metadata) to a mappable type.
- Upgrade SeaTunnel — Oracle type coverage grows between versions.
- Add a convert() case for the type in OracleTypeConverter and submit upstream.
Example fix
// before SELECT * FROM docs; -- XMLType col fails // after SELECT id, XMLSERIALIZE(CONTENT doc AS CLOB) AS doc FROM docs;
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check Oracle column types for converter support
for (BasicTypeDefine c : oracleTableColumns) {
try { new OracleTypeConverter().convert(c); }
catch (SeaTunnelRuntimeException e) {
throw new IllegalStateException("Unsupported Oracle type " + c.getDataType() + " on column " + c.getName());
}
} Type guard
boolean isOracleTypeSupported(BasicTypeDefine td) {
try { new OracleTypeConverter().convert(td); return true; }
catch (SeaTunnelRuntimeException e) { return false; }
} Try / catch
try {
converter.convert(typeDefine);
} catch (SeaTunnelRuntimeException e) {
if (e.getMessage().contains("unsupported convert type")) {
LOG.error("Oracle column {} type {} unsupported; cast or exclude it", typeDefine.getName(), typeDefine.getDataType());
}
throw e;
} Prevention
- Scan DDL for OBJECT/ANYDATA/BFILE/XMLType columns before ingestion.
- Use SQL casts/serializations (XMLSERIALIZE, SDO_UTIL.TO_WKTGEOMETRY) for special columns.
- Prefer explicit column lists in the source query.
- Upgrade SeaTunnel for extended Oracle type coverage.
When it happens
Trigger: convert(BasicTypeDefine) on OracleTypeConverter with an oracleType outside the switch at OracleTypeConverter.java:282 — e.g. BFILE, ANYDATA, user-defined OBJECT/TABLE types, opaque types, or unusual type metadata strings. Known test/production paths call it during column conversion.
Common situations: Reading Oracle tables with object/relational types (SDO_GEOMETRY, XMLType in some versions, ANYDATA), BFILE columns, or legacy schema types; auto schema discovery hitting a column type the converter doesn't enumerate.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/9a72e2a3d968b624.
Report an issue: GitHub.