{"record":{"id":"d3de6ee5f1ff7693","repo":"apache/dolphinscheduler","slug":"datasource-plugin-s-is-not-found","errorCode":null,"errorMessage":"datasource plugin '%s' is not found","messagePattern":"datasource plugin '(.+?)' is not found","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/plugin/DataSourceClientProvider.java","lineNumber":68,"sourceCode":"                            TimeUnit.HOURS)\n                    .removalListener((RemovalListener<String, PooledDataSourceClient>) notification -> {\n                        try (PooledDataSourceClient closedClient = notification.getValue()) {\n                            log.info(\"Datasource: {} is removed from cache due to expire\", notification.getKey());\n                        } catch (Exception e) {\n                            log.error(\"Close datasource client error\", e);\n                        }\n                    })\n                    .maximumSize(100)\n                    .build();\n\n    public static DataSourceClient getPooledDataSourceClient(DbType dbType,\n                                                             ConnectionParam connectionParam) throws ExecutionException {\n        BaseConnectionParam baseConnectionParam = (BaseConnectionParam) connectionParam;\n        String datasourceUniqueId = DataSourceUtils.getDatasourceUniqueId(baseConnectionParam, dbType);\n        return POOLED_DATASOURCE_CLIENT_CACHE.get(datasourceUniqueId, () -> {\n            DataSourceChannel dataSourceChannel = DataSourcePluginManager.getDataSourceChannel(dbType);\n            if (null == dataSourceChannel) {\n                throw new RuntimeException(String.format(\"datasource plugin '%s' is not found\", dbType.getName()));\n            }\n            return dataSourceChannel.createPooledDataSourceClient(baseConnectionParam, dbType);\n        });\n    }\n\n    public static Connection getPooledConnection(DbType dbType,\n                                                 ConnectionParam connectionParam) throws SQLException, ExecutionException {\n        return getPooledDataSourceClient(dbType, connectionParam).getConnection();\n    }\n\n    public static AdHocDataSourceClient getAdHocDataSourceClient(DbType dbType, ConnectionParam connectionParam) {\n        BaseConnectionParam baseConnectionParam = (BaseConnectionParam) connectionParam;\n        DataSourceChannel dataSourceChannel = DataSourcePluginManager.getDataSourceChannel(dbType);\n        if (null == dataSourceChannel) {\n            throw new RuntimeException(String.format(\"datasource plugin '%s' is not found\", dbType.getName()));\n        }\n        return dataSourceChannel.createAdHocDataSourceClient(baseConnectionParam, dbType);\n    }","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/src/main/java/org/apache/dolphinscheduler/plugin/datasource/api/plugin/DataSourceClientProvider.java#L50-L86","documentation":"getPooledDataSourceClient looks up the DataSourceChannel for the given DbType from DataSourcePluginManager; when no plugin is registered for that type it throws 'datasource plugin <type> is not found' inside the pooled-client cache loader.","triggerScenarios":"Requesting a pooled connection for a DbType whose plugin jar is not deployed/loaded, or a typo/unsupported dbType value.","commonSituations":"Deployment missing datasource plugin jars (e.g. dolphinscheduler-datasource-clickhouse not installed), custom datasource type added to enum but no plugin packaged, plugin loading failure at startup.","solutions":["Deploy/install the plugin jar for the requested DbType and restart","Check logs for DataSourcePluginManager load failures","Confirm the DbType value matches an installed plugin","Verify plugin directory configuration points to the right location"],"exampleFix":"// before\ncp.getPooledConnection(DbType.DORIS, param); // no doris plugin installed\n// after\n// install dolphinscheduler-datasource-doris jar, restart, then retry\ncp.getPooledConnection(DbType.MYSQL, param);","handlingStrategy":"try-catch","validationCode":"DataSourceChannel ch = DataSourcePluginManager.getDataSourceChannel(dbType); if (ch == null) { /* plugin absent — deploy before connecting */ }","typeGuard":null,"tryCatchPattern":"try { Connection c = DataSourceClientProvider.getPooledConnection(dbType, param); } catch (ExecutionException | RuntimeException e) { if (String.valueOf(e.getMessage()).contains(\"is not found\")) { /* deploy plugin */ } }","preventionTips":["Deploy all needed datasource plugin jars at install time","Check plugin load logs after startup","Validate DbType against installed plugins before use"],"tags":["plugin","datasource","deployment"],"backgroundTag":"resource-not-found","analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}