apache/seatunnel · error · UnsupportedOperationException
TypeConverter is not supported
Error message
TypeConverter is not supported
What it means
JdbcDialect.getTypeConverter() is a default interface method that throws UnsupportedOperationException('TypeConverter is not supported'). Dialects that do not implement the newer BasicTypeConverter-based type conversion surface inherit this default; calling it means the selected dialect cannot provide a TypeConverter<BasicTypeDefine> for mapping JDBC metadata types to SeaTunnel types.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialect.java:96
*
* @return the dialect name.
*/
String dialectName();
/**
* Get converter that convert jdbc object to seatunnel internal object.
*
* @return a row converter for the database
*/
JdbcRowConverter getRowConverter();
/**
* Get converter that convert type object to seatunnel internal type.
*
* @return a type converter for the database
*/
default TypeConverter<BasicTypeDefine> getTypeConverter() {
throw new UnsupportedOperationException("TypeConverter is not supported");
}
/**
* get jdbc meta-information type to seatunnel data type mapper.
*
* @return a type mapper for the database
*/
JdbcDialectTypeMapper getJdbcDialectTypeMapper();
/**
* Whether this dialect can reliably read primary-key metadata through {@link
* java.sql.DatabaseMetaData#getPrimaryKeys(String, String, String)}.
*/
default boolean supportsPrimaryKeyMetadata() {
return true;
}
default List<String> getPartitionKeys(Connection connection, TablePath tablePath)View on GitHub (pinned to cf67b549a7)
Solutions
- Implement getTypeConverter() in your custom dialect returning a proper TypeConverter<BasicTypeDefine>
- Use the dialect class provided by SeaTunnel for your database instead of a generic/custom one
- Upgrade SeaTunnel so your database's dialect implements the TypeConverter API
- If only type mapping via getTypeMapper is needed, avoid the code path calling getTypeConverter (e.g. bypass typeDefine-based catalog operations)
Example fix
// before
class MyDialect implements JdbcDialect { /* no getTypeConverter override */ }
// after
@Override
public TypeConverter<BasicTypeDefine> getTypeConverter() {
return MyTypeConverter.INSTANCE;
} Defensive patterns
Strategy: type-guard
Validate before calling
JdbcDialect d = ...;
boolean supportsTypeConverter;
try { d.getTypeConverter(); supportsTypeConverter = true; }
catch (UnsupportedOperationException e) { supportsTypeConverter = false; }
if (!supportsTypeConverter) throw new IllegalStateException("Dialect " + d + " lacks TypeConverter; pick another dialect or implement getTypeConverter"); Type guard
boolean hasTypeConverter(JdbcDialect d) {
try { d.getTypeConverter(); return true; }
catch (UnsupportedOperationException e) { return false; }
} Try / catch
try {
TypeConverter<BasicTypeDefine> tc = dialect.getTypeConverter();
} catch (UnsupportedOperationException e) {
LOG.error("Dialect {} does not support TypeConverter; use its dedicated dialect or implement getTypeConverter", dialect.dialectName());
throw e;
} Prevention
- When writing custom dialects, implement getTypeConverter along with getTypeMapper
- Verify dialect capability at startup with the type guard above
- Keep custom dialects in sync with the JdbcDialect interface of your SeaTunnel version
- Prefer maintained dialect classes over generic fallbacks
When it happens
Trigger: Catalog/typeDefine code calls getTypeConverter() on a dialect that has not overridden it — e.g. using a minimal/custom dialect implementation, or a database whose dialect predates the TypeConverter API — during table schema discovery or type resolution.
Common situations: Custom in-house dialect extending JdbcDialect without implementing getTypeConverter; older third-party dialect used with newer SeaTunnel catalog code that requires TypeConverter; choosing the wrong dialect class for the database.
Related errors
- %s (%s) type doesn't have a mapping to the SQL database colu
- Unsupported action type:
- Unsupported constraint type:
- Unsupported constraint type:
- Unsupported JDBC type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/4092594919d83cd8.
Report an issue: GitHub.