apache/beam · error · IllegalArgumentException
Catalog not found:
Error message
Catalog not found:
What it means
InMemoryCatalogManager.useCatalog is a guard verifying the requested catalog exists: if the name (matched case-insensitively against registered catalogs) is absent, it throws IllegalArgumentException 'Catalog not found'. Only catalogs previously created or the built-in 'default' can be switched to.
Solutions
- Check the catalog name for typos and case; it must match an existing catalog.
- Create the catalog first with createCatalog, then switch to it.
- List available catalogs (SHOW CATALOGS) to confirm the name.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/catalog/InMemoryCatalogManager.java:64 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/b4b1bb3c35da3911.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/catalog/InMemoryCatalogManager.java:64
this.catalogs.put(
"default", new InMemoryCatalog("default", defaultMetastore, Collections.emptyMap()));
this.currentCatalogName = "default";
}
@Override
public void createCatalog(String name, String type, Map<String, String> properties) {
Preconditions.checkState(
!catalogs.containsKey(name), "Catalog with name '%s' already exists.", name);
Catalog catalog = findAndCreateCatalog(name, type, properties);
tableProviders.values().forEach(catalog::registerTableProvider);
catalogs.put(name, catalog);
}
@Override
public void useCatalog(String name) {
if (!catalogs.containsKey(name)) {
throw new IllegalArgumentException("Catalog not found: " + name);
}
this.currentCatalogName = name;
}
@Override
public Catalog currentCatalog() {
return checkStateNotNull(catalogs.get(currentCatalogName));
}
@Override
public @Nullable Catalog getCatalog(String name) {
return catalogs.get(name);
}
@Override
public void dropCatalog(String name) {
catalogs.remove(name);
}View on GitHub (pinned to 12126d8942)