{"record":{"id":"68e18eb1e3d10033","repo":"apache/iceberg","slug":"namespace-does-not-exist-s-68e18e","errorCode":null,"errorMessage":"Namespace does not exist: %s","messagePattern":"Namespace does not exist: (.+?)","errorType":"exception","errorClass":"NoSuchNamespaceException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/inmemory/InMemoryCatalog.java","lineNumber":251,"sourceCode":"            \"Namespace %s is not empty. Contains %d table(s).\", namespace, tableIdentifiers.size());\n      }\n\n      List<TableIdentifier> viewIdentifiers = listViews(namespace);\n      if (!viewIdentifiers.isEmpty()) {\n        throw new NamespaceNotEmptyException(\n            \"Namespace %s is not empty. Contains %d view(s).\", namespace, viewIdentifiers.size());\n      }\n\n      return namespaces.remove(namespace) != null;\n    }\n  }\n\n  @Override\n  public boolean setProperties(Namespace namespace, Map<String, String> properties)\n      throws NoSuchNamespaceException {\n    synchronized (this) {\n      if (!namespaceExists(namespace)) {\n        throw new NoSuchNamespaceException(\"Namespace does not exist: %s\", namespace);\n      }\n\n      namespaces.computeIfPresent(\n          namespace,\n          (k, v) ->\n              ImmutableMap.<String, String>builder()\n                  .putAll(v)\n                  .putAll(properties)\n                  .buildKeepingLast());\n\n      return true;\n    }\n  }\n\n  @Override\n  public boolean removeProperties(Namespace namespace, Set<String> properties)\n      throws NoSuchNamespaceException {\n    synchronized (this) {","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/inmemory/InMemoryCatalog.java#L233-L269","documentation":"NoSuchNamespaceException from InMemoryCatalog.setProperties: an attempt to set namespace properties targeted a namespace that does not exist in the in-memory catalog. The %s is the offending Namespace; the guard fires before any property is applied.","triggerScenarios":"Calling catalog.setProperties(ns, props) for a namespace never created or already dropped.","commonSituations":"Typo in namespace level (case-sensitive levels); namespace dropped by another process before the update; setting properties before calling createNamespace.","solutions":["Call createNamespace(ns) first, or verify with namespaceExists(ns)","Check the namespace name for typos and exact case of each level","Re-create the namespace if it was dropped concurrently"],"exampleFix":"// before\ncatalog.setProperties(ns, props);\n// after\nif (!catalog.namespaceExists(ns)) {\n  catalog.createNamespace(ns);\n}\ncatalog.setProperties(ns, props);","handlingStrategy":"validation","validationCode":"if (!catalog.namespaceExists(ns)) catalog.createNamespace(ns);","typeGuard":null,"tryCatchPattern":"try { catalog.setProperties(ns, props); } catch (NoSuchNamespaceException e) { catalog.createNamespace(ns); catalog.setProperties(ns, props); }","preventionTips":["Create namespaces before configuring them","Double-check namespace level casing"],"tags":["catalog","namespace","not-found"],"backgroundTag":"entity-not-found","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"}