{"record":{"id":"cc9720f415fc37cb","repo":"apache/iceberg","slug":"unknown-catalog-type-s-must-be-hive-hadoop-cc9720","errorCode":null,"errorMessage":"Unknown catalog-type: %s (Must be 'hive', 'hadoop' or 'rest')","messagePattern":"Unknown catalog-type: (.+?) \\(Must be 'hive', 'hadoop' or 'rest'\\)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java","lineNumber":119,"sourceCode":"    String catalogType = properties.getOrDefault(ICEBERG_CATALOG_TYPE, ICEBERG_CATALOG_TYPE_HIVE);\n    switch (catalogType.toLowerCase(Locale.ROOT)) {\n      case ICEBERG_CATALOG_TYPE_HIVE:\n        // The values of properties 'uri', 'warehouse', 'hive-conf-dir' are allowed to be null, in\n        // that case it will\n        // fallback to parse those values from hadoop configuration which is loaded from classpath.\n        String hiveConfDir = properties.get(HIVE_CONF_DIR);\n        String hadoopConfDir = properties.get(HADOOP_CONF_DIR);\n        Configuration newHadoopConf = mergeHiveConf(hadoopConf, hiveConfDir, hadoopConfDir);\n        return CatalogLoader.hive(name, newHadoopConf, properties);\n\n      case ICEBERG_CATALOG_TYPE_HADOOP:\n        return CatalogLoader.hadoop(name, hadoopConf, properties);\n\n      case ICEBERG_CATALOG_TYPE_REST:\n        return CatalogLoader.rest(name, hadoopConf, properties);\n\n      default:\n        throw new UnsupportedOperationException(\n            \"Unknown catalog-type: \" + catalogType + \" (Must be 'hive', 'hadoop' or 'rest')\");\n    }\n  }\n\n  @Override\n  public String factoryIdentifier() {\n    return FACTORY_IDENTIFIER;\n  }\n\n  @Override\n  public Set<ConfigOption<?>> requiredOptions() {\n    return ImmutableSet.<ConfigOption<?>>builder().build();\n  }\n\n  @Override\n  public Set<ConfigOption<?>> optionalOptions() {\n    return ImmutableSet.<ConfigOption<?>>builder().build();\n  }","sourceCodeStart":101,"sourceCodeEnd":137,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java#L101-L137","documentation":"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.","triggerScenarios":"Creating a catalog via CREATE CATALOG ... WITH ('type'='iceberg', 'catalog-type'='jdbc'|'nessie'|typo) or FlinkCatalogFactory.createCatalogLoader with an unknown catalog-type option.","commonSituations":"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.","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"],"exampleFix":"// before\nWITH ('type'='iceberg', 'catalog-type'='jdbc', ...)\n// after\nWITH ('type'='iceberg', 'catalog-type'='rest', 'uri'='https://...')","handlingStrategy":"validation","validationCode":"String type = props.get(\"catalog-type\");\nif (!\"hive\".equals(type) && !\"hadoop\".equals(type) && !\"rest\".equals(type)) {\n  throw new IllegalArgumentException(\"catalog-type must be hive, hadoop or rest, got: \" + type);\n}","typeGuard":null,"tryCatchPattern":"try { factory.createCatalogLoader(name, props, hadoopConf); } catch (UnsupportedOperationException e) { /* fix catalog-type option */ }","preventionTips":["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"],"tags":["flink","configuration","unsupported-operation"],"backgroundTag":"invalid-enum-value","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}