prestodb/presto · error · PrestoException
NOT_FOUND
NOT_FOUND
Error message
Federation connector not loaded:
What it means
FlightShimPluginManager.getConnectorCodecs looks up a federation catalog by connectorId, then finds the registered ConnectorCodecs for that catalog's connector name. If no codecs were registered for the connector (the connector plugin was never loaded into the shim), it throws PrestoException NOT_FOUND with 'Federation connector not loaded: <connectorName>'.
Source
Thrown at presto-flight-shim/src/main/java/com/facebook/presto/flightshim/FlightShimPluginManager.java:140
pluginsLoading,
pluginsLoaded,
null,
this,
cachedPluginClassLoaders.get());
}
public void loadCatalogs(Map<String, Map<String, String>> additionalCatalogs)
throws Exception
{
staticCatalogStore.loadCatalogs(additionalCatalogs);
}
public ConnectorCodecs getConnectorCodecs(String connectorId)
{
Catalog catalog = catalogManager.getCatalog(connectorId).orElseThrow(() -> new PrestoException(NOT_FOUND, "Federation catalog does not exist: " + connectorId));
ConnectorCodecs connectorCodecs = connectorCodecMap.get(catalog.getCatalogContext().getConnectorName());
if (connectorCodecs == null) {
throw new PrestoException(NOT_FOUND, "Federation connector not loaded: " + catalog.getCatalogContext().getConnectorName());
}
return connectorCodecs;
}
@Override
public void installPlugin(Plugin plugin)
{
for (ConnectorFactory factory : plugin.getConnectorFactories()) {
log.info("Registering connector %s", factory.getName());
connectorManager.addConnectorFactory(factory);
connectorCodecMap.computeIfAbsent(factory.getName(), name -> {
try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(factory.getClass().getClassLoader())) {
ConnectorCodecs holder = new ConnectorCodecs(factory.getHandleResolver(), typeDeserializer, blockEncodingManager);
log.debug("Finished loading connector: %s", name);
return holder;
}
});
}View on GitHub (pinned to 55bb57d202)
Solutions
- Install/load the connector plugin in the flight shim server (verify the plugin jar is in the plugin directory and loads at startup)
- Verify the catalog's connector-name property matches a connector that the shim supports
- Restart the flight shim server after adding the plugin so connectorCodecMap is populated
Example fix
// before: catalog references connector not added to shim connector-name=postgres // plugin not loaded // after: deploy the plugin and confirm startup log shows it loaded plugin.dir contains presto-postgres/ ... connector registered
Defensive patterns
Strategy: try-catch
Validate before calling
// Verify the connector plugin is loaded before requesting codecs
Optional<Catalog> cat = catalogManager.getCatalog(connectorId);
if (cat.isEmpty()) throw new IllegalStateException("Federation catalog does not exist: " + connectorId);
// check server logs at startup for: "Loaded plugin ... <connectorName>" Type guard
boolean isFederationConnectorReady(String connectorId) {
return catalogManager.getCatalog(connectorId)
.map(c -> connectorCodecMap.containsKey(c.getCatalogContext().getConnectorName()))
.orElse(false);
} Try / catch
try { codecs = pluginManager.getConnectorCodecs(connectorId); }
catch (PrestoException e) {
if (e.getErrorCode() == NOT_FOUND.toErrorCode()) {
throw new IllegalStateException("Deploy the connector plugin for " + connectorId, e);
} throw e;
} Prevention
- Verify plugin jars are deployed and loaded at shim startup before accepting traffic
- Keep the shim's supported connector list in sync with the catalogs it serves
- Health-check connectorCodecMap contents after startup
When it happens
Trigger: Calling getConnectorCodecs for a catalog whose connector name has no entry in connectorCodecMap — i.e. the connector plugin wasn't installed/loaded into the flight shim process, or the catalog points at a connector type the shim doesn't support.
Common situations: Federation client requests a catalog backed by a connector that was not added to the flight shim server's plugin list; plugin jar missing from the plugin directory; connector name mismatch after catalog reconfiguration.
Understand the failure class
Background: NOT_FOUND error code: why tRPC, Harbor, Nacos and other libraries return 404 "not found" errors for resources that may still exist — this error's family across 11 libraries.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/c8117a4157262104.
Report an issue: GitHub.