apache/iceberg · error · IllegalArgumentException

Unsupported Nessie content type

Error message

Unsupported Nessie content type 

What it means

NessieUtil.contentTypeString converts a Nessie Content.Type into the user-facing string ('Table', 'View', 'Namespace'). If the type is none of ICEBERG_VIEW/ICEBERG_TABLE/NAMESPACE, an IllegalArgumentException is thrown. This guards against unknown or newly introduced Nessie content types reaching Iceberg catalog code.

Solutions

  1. Filter or skip non-Iceberg content entries when listing/processing the Nessie repo.
  2. Align iceberg-nessie and nessie-client versions so all content types are known.
  3. Handle unknown types in your own wrapper code before calling Iceberg catalog APIs.

Example fix

// before
String s = NessieUtil.contentTypeString(content.getType()); // IllegalArgumentException for DELTA
// after
if (content.getType() == Content.Type.ICEBERG_TABLE || content.getType() == Content.Type.ICEBERG_VIEW) {
  String s = NessieUtil.contentTypeString(content.getType());
}
Defensive patterns

Strategy: type-guard

Validate before calling

Set<Content.Type> supported = Set.of(Content.Type.ICEBERG_TABLE, Content.Type.ICEBERG_VIEW, Content.Type.NAMESPACE); if (!supported.contains(type)) { skip(entry); }

Type guard

boolean isSupportedContentType(Content.Type t) { return t == Content.Type.ICEBERG_TABLE || t == Content.Type.ICEBERG_VIEW || t == Content.Type.NAMESPACE; }

Try / catch

try { String s = NessieUtil.contentTypeString(type); } catch (IllegalArgumentException e) { /* unknown type: skip or upgrade deps */ }

Prevention

When it happens

Trigger: contentType/contentTypeString called with a content type outside the supported set, e.g. Content.Type.DELTA_LAKE or types added in newer Nessie versions; enumerating a Nessie repo whose entries include non-Iceberg content.

Common situations: A Nessie repository shared with Delta Lake tooling (Delta content stored under the same repo); mismatched nessie-client / iceberg-nessie versions where new enum values are unknown.

Related errors


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

Appendix: source

Thrown at nessie/src/main/java/org/apache/iceberg/nessie/NessieUtil.java:332

        }
      case KEY_EXISTS:
        return Optional.of(
            new AlreadyExistsException(ex, "%s already exists: %s", contentType, conflict.key()));
      default:
        return Optional.empty();
    }
  }

  static String contentTypeString(Content.Type type) {
    if (type.equals(Content.Type.ICEBERG_VIEW)) {
      return "View";
    } else if (type.equals(Content.Type.ICEBERG_TABLE)) {
      return "Table";
    } else if (type.equals(Content.Type.NAMESPACE)) {
      return "Namespace";
    }

    throw new IllegalArgumentException("Unsupported Nessie content type " + type.name());
  }
}

View on GitHub (pinned to 86d9c8fc54)