{"record":{"id":"1fd49944569fa3e5","repo":"apache/iceberg","slug":"namespace-s-does-not-exist","errorCode":null,"errorMessage":"Namespace %s does not exist","messagePattern":"Namespace (.+?) does not exist","errorType":"exception","errorClass":"NoSuchNamespaceException","httpStatus":404,"severity":"error","filePath":"dell/src/main/java/org/apache/iceberg/dell/ecs/EcsCatalog.java","lineNumber":155,"sourceCode":"  protected TableOperations newTableOps(TableIdentifier tableIdentifier) {\n    return new EcsTableOperations(\n        String.format(\"%s.%s\", catalogName, tableIdentifier),\n        tableURI(tableIdentifier),\n        fileIO,\n        this);\n  }\n\n  @Override\n  protected String defaultWarehouseLocation(TableIdentifier tableIdentifier) {\n    String tableLocation = LocationUtil.tableLocation(tableIdentifier, uniqueTableLocation);\n    return String.format(\"%s/%s\", namespacePrefix(tableIdentifier.namespace()), tableLocation);\n  }\n\n  /** Iterate all table objects with the namespace prefix. */\n  @Override\n  public List<TableIdentifier> listTables(Namespace namespace) {\n    if (!namespace.isEmpty() && !namespaceExists(namespace)) {\n      throw new NoSuchNamespaceException(\"Namespace %s does not exist\", namespace);\n    }\n\n    String marker = null;\n    List<TableIdentifier> results = Lists.newArrayList();\n    // Add the end slash when delimiter listing\n    EcsURI prefix = new EcsURI(String.format(\"%s/\", namespacePrefix(namespace)));\n    do {\n      ListObjectsResult listObjectsResult =\n          client.listObjects(\n              new ListObjectsRequest(prefix.bucket())\n                  .withDelimiter(\"/\")\n                  .withPrefix(prefix.name())\n                  .withMarker(marker));\n      marker = listObjectsResult.getNextMarker();\n      results.addAll(\n          listObjectsResult.getObjects().stream()\n              .filter(s3Object -> s3Object.getKey().endsWith(TABLE_OBJECT_SUFFIX))\n              .map(object -> parseTableId(namespace, prefix, object))","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/dell/src/main/java/org/apache/iceberg/dell/ecs/EcsCatalog.java#L137-L173","documentation":"EcsCatalog.listTables first verifies the namespace exists (by checking for its namespace marker object in ECS) and throws NoSuchNamespaceException otherwise. Callers must create the namespace before listing its tables. dropNamespace and other flows that call listTables can surface this error.","triggerScenarios":"Calling catalog.listTables(Namespace.of(\"a\",\"b\")) when no table/namespace marker objects exist under that prefix, or after the namespace was deleted; dropNamespace invoking listTables on an already-removed namespace.","commonSituations":"Typo in namespace levels; querying a namespace created outside this catalog (without its marker object); race where another job dropped the namespace concurrently.","solutions":["Check catalog.namespaceExists(namespace) before calling listTables, or catch NoSuchNamespaceException.","Create the namespace with catalog.createNamespace(namespace) first.","Correct the namespace spelling/hierarchy to match the existing ECS prefix."],"exampleFix":"// before\nList<TableIdentifier> tables = catalog.listTables(Namespace.of(\"sales\"));\n// after\nif (catalog.namespaceExists(Namespace.of(\"sales\"))) {\n  List<TableIdentifier> tables = catalog.listTables(Namespace.of(\"sales\"));\n}","handlingStrategy":"try-catch","validationCode":"Namespace ns = Namespace.of(\"a\", \"b\");\nif (!catalog.namespaceExists(ns)) { catalog.createNamespace(ns); }","typeGuard":null,"tryCatchPattern":"try {\n  return catalog.listTables(ns);\n} catch (NoSuchNamespaceException e) {\n  return Collections.emptyList();\n}","preventionTips":["Create namespaces via the same EcsCatalog instance that lists them","Watch for identifiers differing in case or trailing slashes","Handle concurrent drops in multi-job environments"],"tags":["dell","ecs","catalog","namespace"],"backgroundTag":"resource-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"}