{"record":{"id":"d286e36e12c2b088","repo":"apache/seatunnel","slug":"cannot-find-unique-plugin-jar-for-pluginidentifier","errorCode":null,"errorMessage":"Cannot find unique plugin jar for pluginIdentifier: %s -> %s. Possible impact jar: %s","messagePattern":"Cannot find unique plugin jar for pluginIdentifier: (.+?) -> (.+?)\\. Possible impact jar: (.+?)","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-plugin-discovery/src/main/java/org/apache/seatunnel/plugin/discovery/AbstractPluginDiscovery.java","lineNumber":540,"sourceCode":"                && StringUtils.startsWithIgnoreCase(pathname.getName(), pluginJarPrefix);\n    }\n\n    private Optional<List<URL>> selectPluginJar(\n            File[] targetPluginFiles, String pluginJarPrefix, String pluginName, PluginType type) {\n        List<URL> resMatchedUrls = new ArrayList<>();\n        for (File file : targetPluginFiles) {\n            Optional<URL> matchedUrl = findMatchingUrl(file, type, pluginName);\n            matchedUrl.ifPresent(resMatchedUrls::add);\n        }\n        if (pluginName.contains(\"cdc\")) {\n            if (resMatchedUrls.size() != 2) {\n                throw new SeaTunnelException(\n                        String.format(\n                                \"Cannot find plugin jar for pluginIdentifier: %s -> %s. Possible impact jar: %s\",\n                                pluginName, pluginJarPrefix, Arrays.asList(targetPluginFiles)));\n            }\n        } else if (resMatchedUrls.size() != 1) {\n            throw new SeaTunnelException(\n                    String.format(\n                            \"Cannot find unique plugin jar for pluginIdentifier: %s -> %s. Possible impact jar: %s\",\n                            pluginName, pluginJarPrefix, Arrays.asList(targetPluginFiles)));\n        }\n        return Optional.of(resMatchedUrls);\n    }\n\n    private Optional<URL> findMatchingUrl(File file, PluginType type, String pluginName) {\n        Map<PluginIdentifier, String> pluginInstanceMap = null;\n        switch (type) {\n            case SINK:\n                pluginInstanceMap = sinkPluginInstance;\n                break;\n            case SOURCE:\n                pluginInstanceMap = sourcePluginInstance;\n                break;\n            case TRANSFORM:\n                pluginInstanceMap = transformPluginInstance;","sourceCodeStart":522,"sourceCodeEnd":558,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-plugin-discovery/src/main/java/org/apache/seatunnel/plugin/discovery/AbstractPluginDiscovery.java#L522-L558","documentation":"selectPluginJar requires a unique matching jar for non-CDC plugins. When the name-matched candidate URLs count is not exactly 1, it throws SeaTunnelException listing all target plugin files, because it cannot pick which jar to load.","triggerScenarios":"findPluginJarPath resolves a plugin whose name does not contain 'cdc' and resMatchedUrls.size() != 1 — either zero matches (jar not installed) or multiple matches (duplicate connector jars).","commonSituations":"Connector jar not downloaded at all; two versions of the same connector jar in the connectors dir; a fat/uber jar plus the original both matching the plugin prefix.","solutions":["If zero matches: install the connector with sh bin/install-plugin.sh or download the jar into $SEATUNNEL_HOME/connectors","If multiple matches: delete stale/duplicate versions so exactly one jar matches the plugin identifier","Keep connector jar filenames in the standard connector-<name>-<version>.jar format"],"exampleFix":"// before: ambiguous\nconnectors/connector-kafka-2.3.0.jar\nconnectors/connector-kafka-2.3.12.jar\n// after\nrm connectors/connector-kafka-2.3.0.jar","handlingStrategy":"validation","validationCode":"ls $SEATUNNEL_HOME/connectors | grep \"connector-<name>-\"\n# expect exactly one line; if zero, install it; if multiple, delete stale versions","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install connectors via install-plugin.sh instead of manual copies","After upgrades, remove old connector jars","Keep standard connector-<name>-<version>.jar naming","Audit the connectors dir as part of deployment checks"],"tags":["java","plugin-discovery","jar-resolution","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}