{"record":{"id":"3c9027c658d67e36","repo":"apache/seatunnel","slug":"cannot-find-plugin-jar-for-pluginidentifier-s","errorCode":null,"errorMessage":"Cannot find plugin jar for pluginIdentifier: %s -> %s. Possible impact jar: %s","messagePattern":"Cannot find 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":534,"sourceCode":"            return pathname.getName().endsWith(\".jar\")\n                    && (StringUtils.startsWithIgnoreCase(pathname.getName(), pluginJarPrefix)\n                            || StringUtils.startsWithIgnoreCase(\n                                    pathname.getName(), \"connector-cdc-base\"));\n        }\n        return pathname.getName().endsWith(\".jar\")\n                && 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;","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-plugin-discovery/src/main/java/org/apache/seatunnel/plugin/discovery/AbstractPluginDiscovery.java#L516-L552","documentation":"selectPluginJar matches a requested plugin to candidate jars in the plugin dir. CDC connectors ship as two jars (base + specific connector); if matching yields anything other than exactly 2 URLs for a 'cdc' plugin, it throws SeaTunnelException listing the candidate jars considered.","triggerScenarios":"findPluginJarPath is called for a plugin whose name contains 'cdc', and findMatchingUrl returns a count != 2 across targetPluginFiles — e.g. one of the CDC jar pair is missing or multiple duplicate copies exist.","commonSituations":"Manually copied connector-cdc jars leaving base jar missing; multiple versions of connector-cdc-base present causing ambiguous matches; install-plugin.sh partially failed.","solutions":["List the connectors dir and ensure both the CDC base jar and the specific CDC connector jar (same version) are present","Remove duplicate/old versions of connector-cdc-* jars so exactly one pair matches","Re-run sh bin/install-plugin.sh <version> to restore a consistent CDC jar set"],"exampleFix":"// before\nconnectors/connector-cdc-mysql-2.3.12.jar   # base jar missing\n// after\nconnectors/connector-cdc-base-2.3.12.jar\nconnectors/connector-cdc-mysql-2.3.12.jar","handlingStrategy":"validation","validationCode":"ls $SEATUNNEL_HOME/connectors | grep cdc\n# expect exactly: connector-cdc-base-<v>.jar plus one connector-cdc-<engine>-<v>.jar, all same version","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always install CDC connectors as a matched base+engine pair of the same version","Never copy individual CDC jars manually between installs","Re-run install-plugin.sh to restore consistency","Clean old CDC versions after upgrades"],"tags":["java","plugin-discovery","cdc","jar-resolution"],"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-14T16:17:12.679Z"}