{"record":{"id":"57d9f9d1a789b1f7","repo":"apache/iceberg","slug":"parameter-warehouse-not-set-nessie-can-t-store","errorCode":null,"errorMessage":"Parameter 'warehouse' not set, Nessie can't store data.","messagePattern":"Parameter 'warehouse' not set, Nessie can't store data\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java","lineNumber":210,"sourceCode":"      //    Pair<CatalogPlugin, Identifier> catalogIdentifier =\n      // SparkUtil.catalogAndIdentifier(nameParts,\n      //        catalogName ->  {\n      //          try {\n      //            return catalogManager.catalog(catalogName);\n      //          } catch (Exception e) {\n      //            return null;\n      //          }\n      //        },\n      //        Identifier::of,\n      //        defaultCatalog,\n      //        currentNamespace\n      //    );\n      LOG.warn(\n          \"Catalog creation for inputName={} and options {} failed, because parameter \"\n              + \"'warehouse' is not set, Nessie can't store data.\",\n          name,\n          catalogOptions);\n      throw new IllegalStateException(\"Parameter 'warehouse' not set, Nessie can't store data.\");\n    }\n\n    return LocationUtil.stripTrailingSlash(warehouseLocation);\n  }\n\n  @Override\n  public void close() throws IOException {\n    if (null != closeableGroup) {\n      closeableGroup.close();\n    }\n  }\n\n  @Override\n  public String name() {\n    return name;\n  }\n\n  @Override","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java#L192-L228","documentation":"NessieCatalog.warehouseLocation requires a 'warehouse' location because Nessie itself does not store data — it only tracks metadata. If neither 'warehouse' nor a resolvable warehouse location is present in the catalog options, initialization fails with this IllegalStateException since tables would have nowhere to be written.","triggerScenarios":"Calling NessieCatalog.initialize with catalog properties that omit the 'warehouse' key (and no default warehouse configured), then creating/loading any table, which resolves warehouseLocation during initialize.","commonSituations":"Configuring a Nessie catalog for the first time and only setting uri/ref; migrating configs from catalogs that don't need a warehouse; Spark SQL DDL where only the location clause was expected to provide paths.","solutions":["Add 'warehouse' to the catalog properties, e.g. setProperty(\"warehouse\", \"s3://bucket/path\") or an HDFS/absolute file path.","If using Spark SQL, set the catalog warehouse in spark SQL conf: spark.sql.catalog.nessie.warehouse=... .","If creating a single table, alternatively give the table an explicit 'location' — though the warehouse property remains the recommended fix."],"exampleFix":"// before\nconf.set(\"spark.sql.catalog.nessie.uri\", \"http://nessie:19120/api/v2\");\n// after\nconf.set(\"spark.sql.catalog.nessie.uri\", \"http://nessie:19120/api/v2\");\nconf.set(\"spark.sql.catalog.nessie.warehouse\", \"s3://my-bucket/warehouse\");","handlingStrategy":"validation","validationCode":"if (properties.get(\"warehouse\") == null) {\n  throw new IllegalArgumentException(\"Nessie catalog requires the 'warehouse' property (e.g. s3://bucket/warehouse)\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  catalog.initialize(name, props, conf);\n} catch (IllegalStateException e) {\n  if (e.getMessage().contains(\"warehouse\")) {\n    props.put(\"warehouse\", \"s3://my-bucket/warehouse\");\n    catalog.initialize(name, props, conf);\n  } else throw e;\n}","preventionTips":["Always set 'warehouse' when configuring a Nessie catalog","Set spark.sql.catalog.<name>.warehouse in Spark confs","Keep a checklist of required Nessie properties: uri, ref, warehouse"],"tags":["nessie","catalog","config","warehouse","storage"],"backgroundTag":"missing-required-config-field","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"}