{"record":{"id":"c8117a4157262104","repo":"prestodb/presto","slug":"not-found-c8117a","errorCode":"NOT_FOUND","errorMessage":"Federation connector not loaded: ","messagePattern":"Federation connector not loaded: ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-flight-shim/src/main/java/com/facebook/presto/flightshim/FlightShimPluginManager.java","lineNumber":140,"sourceCode":"                pluginsLoading,\n                pluginsLoaded,\n                null,\n                this,\n                cachedPluginClassLoaders.get());\n    }\n\n    public void loadCatalogs(Map<String, Map<String, String>> additionalCatalogs)\n            throws Exception\n    {\n        staticCatalogStore.loadCatalogs(additionalCatalogs);\n    }\n\n    public ConnectorCodecs getConnectorCodecs(String connectorId)\n    {\n        Catalog catalog = catalogManager.getCatalog(connectorId).orElseThrow(() -> new PrestoException(NOT_FOUND, \"Federation catalog does not exist: \" + connectorId));\n        ConnectorCodecs connectorCodecs = connectorCodecMap.get(catalog.getCatalogContext().getConnectorName());\n        if (connectorCodecs == null) {\n            throw new PrestoException(NOT_FOUND, \"Federation connector not loaded: \" + catalog.getCatalogContext().getConnectorName());\n        }\n        return connectorCodecs;\n    }\n\n    @Override\n    public void installPlugin(Plugin plugin)\n    {\n        for (ConnectorFactory factory : plugin.getConnectorFactories()) {\n            log.info(\"Registering connector %s\", factory.getName());\n            connectorManager.addConnectorFactory(factory);\n            connectorCodecMap.computeIfAbsent(factory.getName(), name -> {\n                try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(factory.getClass().getClassLoader())) {\n                    ConnectorCodecs holder = new ConnectorCodecs(factory.getHandleResolver(), typeDeserializer, blockEncodingManager);\n                    log.debug(\"Finished loading connector: %s\", name);\n                    return holder;\n                }\n            });\n        }","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-flight-shim/src/main/java/com/facebook/presto/flightshim/FlightShimPluginManager.java#L122-L158","documentation":"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>'.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before: catalog references connector not added to shim\nconnector-name=postgres   // plugin not loaded\n// after: deploy the plugin and confirm startup log shows it loaded\nplugin.dir contains presto-postgres/ ... connector registered","handlingStrategy":"try-catch","validationCode":"// Verify the connector plugin is loaded before requesting codecs\nOptional<Catalog> cat = catalogManager.getCatalog(connectorId);\nif (cat.isEmpty()) throw new IllegalStateException(\"Federation catalog does not exist: \" + connectorId);\n// check server logs at startup for: \"Loaded plugin ... <connectorName>\"","typeGuard":"boolean isFederationConnectorReady(String connectorId) {\n  return catalogManager.getCatalog(connectorId)\n      .map(c -> connectorCodecMap.containsKey(c.getCatalogContext().getConnectorName()))\n      .orElse(false);\n}","tryCatchPattern":"try { codecs = pluginManager.getConnectorCodecs(connectorId); }\ncatch (PrestoException e) {\n  if (e.getErrorCode() == NOT_FOUND.toErrorCode()) {\n    throw new IllegalStateException(\"Deploy the connector plugin for \" + connectorId, e);\n  } throw e;\n}","preventionTips":["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"],"tags":["flight","federation","plugin","not-found"],"backgroundTag":"connector-not-loaded","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}