{"record":{"id":"854de9469400dfbe","repo":"apache/iceberg","slug":"unknown-catalog-type","errorCode":null,"errorMessage":"Unknown catalog type: ","messagePattern":"Unknown catalog type: ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/CatalogUtil.java","lineNumber":340,"sourceCode":"          catalogImpl = ICEBERG_CATALOG_HADOOP;\n          break;\n        case ICEBERG_CATALOG_TYPE_REST:\n          catalogImpl = ICEBERG_CATALOG_REST;\n          break;\n        case ICEBERG_CATALOG_TYPE_GLUE:\n          catalogImpl = ICEBERG_CATALOG_GLUE;\n          break;\n        case ICEBERG_CATALOG_TYPE_NESSIE:\n          catalogImpl = ICEBERG_CATALOG_NESSIE;\n          break;\n        case ICEBERG_CATALOG_TYPE_JDBC:\n          catalogImpl = ICEBERG_CATALOG_JDBC;\n          break;\n        case ICEBERG_CATALOG_TYPE_BIGQUERY:\n          catalogImpl = ICEBERG_CATALOG_BIGQUERY;\n          break;\n        default:\n          throw new UnsupportedOperationException(\"Unknown catalog type: \" + catalogType);\n      }\n    } else {\n      String catalogType = options.get(ICEBERG_CATALOG_TYPE);\n      Preconditions.checkArgument(\n          catalogType == null,\n          \"Cannot create catalog %s, both type and catalog-impl are set: type=%s, catalog-impl=%s\",\n          name,\n          catalogType,\n          catalogImpl);\n    }\n\n    return loadCatalog(catalogImpl, name, options, conf);\n  }\n\n  /**\n   * Load a custom {@link FileIO} implementation.\n   *\n   * <p>The implementation must have a no-arg constructor. If the class implements Configurable, a","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/CatalogUtil.java#L322-L358","documentation":"Thrown by CatalogUtil.buildIcebergCatalog when the catalog type property (iceberg.catalog.type / CatalogUtil.ICEBERG_CATALOG_TYPE) does not match any of the known built-in types (hive, hadoop, rest, glue, nessie, jdbc, bigquery). The type string cannot be mapped to a catalog implementation class, so an UnsupportedOperationException names the unknown value.","triggerScenarios":"Calling buildIcebergCatalog with options containing type=<value> where value is not one of the supported catalog types (case-insensitive), and no catalog-impl is provided; e.g. type=jdbc2, type=HadoopCatalog, or a misspelled type name.","commonSituations":"Typo in the type key value in Spark/Flink/Engine catalog config; using a catalog type added in a newer Iceberg version while running an older runtime; expecting a custom type string to resolve without also setting catalog-impl; stray whitespace or wrong casing handled only via toLowerCase, not trimming.","solutions":["Set type to a supported value: hive, hadoop, rest, glue, nessie, jdbc, or bigquery (case-insensitive).","If the catalog is a custom implementation, remove type and set catalog-impl to the fully qualified class instead (type and catalog-impl cannot both be set).","Upgrade to an Iceberg version that supports the catalog type you need.","Trim/clean the config value to rule out stray whitespace or quoting from environment-based configuration."],"exampleFix":"// before\nMap<String, String> opts = Map.of(\"type\", \"postgres\"); // unknown type\n// after\nMap<String, String> opts = Map.of(\"type\", \"jdbc\", \"uri\", \"jdbc:postgresql://host:5432/db\");","handlingStrategy":"validation","validationCode":"private static final Set<String> KNOWN_TYPES = Set.of(\"hive\",\"hadoop\",\"rest\",\"glue\",\"nessie\",\"jdbc\",\"bigquery\");\nString type = options.getOrDefault(\"type\", \"hive\").toLowerCase(Locale.ROOT);\nif (!KNOWN_TYPES.contains(type)) {\n  throw new IllegalArgumentException(\"Unknown catalog type: \" + type);\n}","typeGuard":"static boolean isKnownCatalogType(String type) {\n  return type == null || Set.of(\"hive\",\"hadoop\",\"rest\",\"glue\",\"nessie\",\"jdbc\",\"bigquery\")\n      .contains(type.toLowerCase(Locale.ROOT));\n}","tryCatchPattern":"try {\n  Catalog catalog = CatalogUtil.buildIcebergCatalog(name, options, conf);\n} catch (UnsupportedOperationException e) {\n  LOG.error(\"Unsupported catalog type '{}' - use one of hive,hadoop,rest,glue,nessie,jdbc,bigquery or set catalog-impl\", e.getMessage());\n  throw e;\n}","preventionTips":["Whitelist/validate the type value in your config loader before building the catalog.","Prefer catalog-impl for custom implementations instead of inventing a type string.","Upgrade Iceberg if the needed type is missing (e.g. bigquery in newer releases).","Check for typos and stray whitespace in YAML/properties-derived type values."],"tags":["configuration","catalog","enum","unsupported"],"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"}