{"record":{"id":"412b73e482709371","repo":"apache/iceberg","slug":"view-does-not-exist-s-412b73","errorCode":null,"errorMessage":"View does not exist: %s","messagePattern":"View does not exist: (.+?)","errorType":"exception","errorClass":"NoSuchViewException","httpStatus":404,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/view/BaseMetastoreViewCatalog.java","lineNumber":61,"sourceCode":"\n  protected abstract ViewOperations newViewOps(TableIdentifier identifier);\n\n  @Override\n  public void initialize(String name, Map<String, String> properties) {\n    super.initialize(name, properties);\n  }\n\n  @Override\n  public String name() {\n    return super.name();\n  }\n\n  @Override\n  public View loadView(TableIdentifier identifier) {\n    if (isValidIdentifier(identifier)) {\n      ViewOperations ops = newViewOps(identifier);\n      if (ops.current() == null) {\n        throw new NoSuchViewException(\"View does not exist: %s\", identifier);\n      } else {\n        return new BaseView(ops, ViewUtil.fullViewName(name(), identifier));\n      }\n    }\n\n    throw new NoSuchViewException(\"Invalid view identifier: %s\", identifier);\n  }\n\n  @Override\n  public ViewBuilder buildView(TableIdentifier identifier) {\n    return new BaseViewBuilder(identifier);\n  }\n\n  protected class BaseViewBuilder implements ViewBuilder {\n    private final TableIdentifier identifier;\n    private final Map<String, String> properties = Maps.newHashMap();\n    private final List<ViewRepresentation> representations = Lists.newArrayList();\n    private Namespace defaultNamespace = null;","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/view/BaseMetastoreViewCatalog.java#L43-L79","documentation":"BaseMetastoreViewsCatalog.loadView resolves view metadata through ViewOperations for a valid identifier. If ops.current() returns null, no metadata exists in the metastore and the library throws NoSuchViewException — the referenced view does not exist.","triggerScenarios":"Calling catalog.loadView(TableIdentifier) where the identifier is valid but no view metadata is present in the underlying metastore (never created, dropped, or wrong catalog/warehouse configured).","commonSituations":"Pointing a catalog at the wrong warehouse/namespace; referencing a view from another catalog; stale code after the view was dropped; typo'd namespace.","solutions":["Verify the view exists (catalog.listViews(namespace)) before loading","Check the catalog's warehouse/metastore configuration points at the right location","Use Catalog.loadTable/view existence checks or createOrReplace if the view should exist"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (!catalog.viewExists(identifier)) { throw new NoSuchNamespaceException(...); /* or handle */ }","typeGuard":"boolean viewAvailable(Catalog c, TableIdentifier id) { return c instanceof ViewCatalog && ((ViewCatalog) c).viewExists(id); }","tryCatchPattern":"try { return catalog.loadView(identifier); } catch (NoSuchViewException e) { return null; /* create or default */ }","preventionTips":["Call listViews to confirm the view's namespace before loading","Keep warehouse/metastore config consistent across jobs","Use createOrReplace for idempotent provisioning"],"tags":["catalog","view","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"}