{"record":{"id":"53fa1f62e1771a36","repo":"apache/iceberg","slug":"unknown-catalog-type-s-must-be-hive-hadoop-53fa1f","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":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"flink/v2.3/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.3/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalogFactory.java#L101-L137","documentation":"FlinkCatalogFactory.createCatalogLoader switches on the configured 'catalog-type' and only supports 'hive', 'hadoop', and 'rest'. Any other value falls through to default and throws UnsupportedOperationException with 'Unknown catalog-type: %s (Must be 'hive', 'hadoop' or 'rest')'.","triggerScenarios":"Setting Flink option 'catalog-type' (factory identifier iceberg) to a misspelled or unsupported value such as 'jdbc', 'nessie', 'glue', 'HADOOP', or an empty string when creating an Iceberg catalog via SQL DDL.","commonSituations":"Copying catalog configs from Iceberg core (which supports more catalog implementations) into Flink SQL; typos like 'hadoop' vs 'hdfs'; assuming JDBC/Nessie catalogs are wired in this Flink module; case-sensitivity mistakes.","solutions":["Set 'catalog-type' to exactly one of 'hive', 'hadoop', or 'rest'","If you need another catalog type (jdbc, nessie, glue), use a Flink version/module that supports it or configure it via a custom CatalogLoader","Check for case or whitespace issues in the configured value"],"exampleFix":"// before\nCREATE CATALOG ice WITH ('type'='iceberg', 'catalog-type'='jdbc', ...);\n\n// after\nCREATE CATALOG ice WITH ('type'='iceberg', 'catalog-type'='hive', 'uri'='thrift://metastore:9083');","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"hive\", \"hadoop\", \"rest\");\nif (!allowed.contains(catalogType)) { throw new IllegalArgumentException(\"catalog-type must be hive|hadop|rest\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set catalog-type to hive, hadoop, or rest","Copy catalog options from Flink docs, not core Iceberg docs","Watch case/whitespace in option values","Use SQL validation/linting for CREATE CATALOG statements"],"tags":["flink","catalog","configuration","unsupported-enum-value"],"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"}