apache/iceberg · error

Catalog creation for inputName=

Error message

Catalog creation for inputName={} and options {} failed, because parameter 'warehouse' is not set, Nessie can't store data.

What it means

NessieCatalog.initialize logs this warning then throws IllegalStateException because the 'warehouse' parameter was not provided in the catalog options, and Nessie has no location to store data files. Nessie is a catalog-only service; the warehouse URI is required to construct table locations.

Solutions

  1. Add the 'warehouse' option to the catalog configuration, e.g. warehouse=s3://bucket/path
  2. Verify the option key spelling in your Spark/Flink conf (it must be exactly 'warehouse')
  3. If using Spark SQL conf, set spark.sql.catalog.<name>.warehouse

Example fix

// before
Map<String,String> opts = Map.of("url","https://nessie.example.com");
Catalog c = CatalogUtil.loadCatalog(NessieCatalog.class.getName(), "nessie", opts);
// after
Map<String,String> opts = Map.of("url","https://nessie.example.com", "warehouse","s3://my-bucket/tables");
Defensive patterns

Strategy: validation

Validate before calling

if (!options.containsKey("warehouse")) { throw new IllegalArgumentException("Nessie catalog requires 'warehouse' option"); }

Try / catch

try { catalog.initialize(name, options); } catch (IllegalStateException e) { if (e.getMessage().contains("warehouse")) { /* prompt for warehouse config and retry */ } else throw e; }

Prevention

When it happens

Trigger: Calling CatalogUtil.loadCatalog(NessieCatalog.class.getName(), ...) or configuring an engine catalog without 'warehouse' in the options map.

Common situations: Spark/Flink catalog config missing warehouse; only nessie.url and auth provided; typo in the option key (e.g. 'warehourse'); migrating config from another catalog that infers warehouse from elsewhere.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/68ec492b01b7ebce. Report an issue: GitHub.

Appendix: source

Thrown at nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java:205

      // Explicitly log a warning, otherwise the thrown exception can get list in the "silent-ish
      // catch"
      // in o.a.i.spark.Spark3Util.catalogAndIdentifier(o.a.s.sql.SparkSession, List<String>,
      //     o.a.s.sql.connector.catalog.CatalogPlugin)
      // in the code block
      //    Pair<CatalogPlugin, Identifier> catalogIdentifier =
      // SparkUtil.catalogAndIdentifier(nameParts,
      //        catalogName ->  {
      //          try {
      //            return catalogManager.catalog(catalogName);
      //          } catch (Exception e) {
      //            return null;
      //          }
      //        },
      //        Identifier::of,
      //        defaultCatalog,
      //        currentNamespace
      //    );
      LOG.warn(
          "Catalog creation for inputName={} and options {} failed, because parameter "
              + "'warehouse' is not set, Nessie can't store data.",
          name,
          catalogOptions);
      throw new IllegalStateException("Parameter 'warehouse' not set, Nessie can't store data.");
    }

    return LocationUtil.stripTrailingSlash(warehouseLocation);
  }

  @Override
  public void close() throws IOException {
    if (null != closeableGroup) {
      closeableGroup.close();
    }
  }

  @Override

View on GitHub (pinned to 86d9c8fc54)