apache/iceberg · error · UnsupportedOperationException
Unknown catalog-type: %s (Must be 'hive', 'hadoop' or 'rest'
Error message
Unknown catalog-type: %s (Must be 'hive', 'hadoop' or 'rest')
What it means
Config validation in FlinkCatalogFactory.createCatalogLoader: the 'catalog-type' property (key iceberg.catalog.type, lowercased) is not one of the accepted values hive, hadoop, or rest. The %s is the offending value; the factory cannot decide which catalog loader to build, so it fails before any connection attempt.
Source
Thrown at flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java:119
String catalogType = properties.getOrDefault(ICEBERG_CATALOG_TYPE, ICEBERG_CATALOG_TYPE_HIVE);
switch (catalogType.toLowerCase(Locale.ROOT)) {
case ICEBERG_CATALOG_TYPE_HIVE:
// The values of properties 'uri', 'warehouse', 'hive-conf-dir' are allowed to be null, in
// that case it will
// fallback to parse those values from hadoop configuration which is loaded from classpath.
String hiveConfDir = properties.get(HIVE_CONF_DIR);
String hadoopConfDir = properties.get(HADOOP_CONF_DIR);
Configuration newHadoopConf = mergeHiveConf(hadoopConf, hiveConfDir, hadoopConfDir);
return CatalogLoader.hive(name, newHadoopConf, properties);
case ICEBERG_CATALOG_TYPE_HADOOP:
return CatalogLoader.hadoop(name, hadoopConf, properties);
case ICEBERG_CATALOG_TYPE_REST:
return CatalogLoader.rest(name, hadoopConf, properties);
default:
throw new UnsupportedOperationException(
"Unknown catalog-type: " + catalogType + " (Must be 'hive', 'hadoop' or 'rest')");
}
}
@Override
public String factoryIdentifier() {
return FACTORY_IDENTIFIER;
}
@Override
public Set<ConfigOption<?>> requiredOptions() {
return ImmutableSet.<ConfigOption<?>>builder().build();
}
@Override
public Set<ConfigOption<?>> optionalOptions() {
return ImmutableSet.<ConfigOption<?>>builder().build();
}View on GitHub (pinned to 86d9c8fc54)
Solutions
- Set 'catalog-type' to one of 'hive', 'hadoop' or 'rest'
- Check spelling/case of the catalog-type value
- If you need jdbc/nessie catalogs, use a build/module that supports them or configure the REST catalog endpoint instead
Example fix
// before
WITH ('type'='iceberg', 'catalog-type'='jdbc', ...)
// after
WITH ('type'='iceberg', 'catalog-type'='rest', 'uri'='https://...') Defensive patterns
Strategy: validation
Validate before calling
String type = props.get("catalog-type");
if (!"hive".equals(type) && !"hadoop".equals(type) && !"rest".equals(type)) {
throw new IllegalArgumentException("catalog-type must be hive, hadoop or rest, got: " + type);
} Try / catch
try { factory.createCatalogLoader(name, props, hadoopConf); } catch (UnsupportedOperationException e) { /* fix catalog-type option */ } Prevention
- Validate catalog-type values against supported set before submitting SQL
- Pin Iceberg version and consult its supported catalog types
- Avoid copying catalog-type configs from other engines/versions
When it happens
Trigger: Creating a catalog via CREATE CATALOG ... WITH ('type'='iceberg', 'catalog-type'='jdbc'|'nessie'|typo) or FlinkCatalogFactory.createCatalogLoader with an unknown catalog-type option.
Common situations: Typos in catalog-type (e.g., 'Hive', 'hadooppro'), using catalog types not yet enabled in the Flink 2.2 Iceberg build (jdbc/nessie supported elsewhere but not here), or stale configs from other Iceberg versions.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unknown catalog-type: %s (Must be 'hive', 'hadoop' or 'rest'
- Altering schema is not supported in the old alterTable API.
- Altering partition keys is not supported yet.
- Creating table with computed columns is not supported yet.
- Creating table with watermark specs is not supported yet.
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/cc9720f415fc37cb.
Report an issue: GitHub.