{"record":{"id":"c3bfbe5bbfe8542e","repo":"apache/seatunnel","slug":"can-not-find-any-plugin-source-sink-transform-in","errorCode":null,"errorMessage":"Can not find any plugin(source/sink/transform) in the dir: %s","messagePattern":"Can not find any plugin\\(source/sink/transform\\) in the dir: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-plugin-discovery/src/main/java/org/apache/seatunnel/plugin/discovery/AbstractPluginDiscovery.java","lineNumber":377,"sourceCode":"                                                \"seatunnel\",\n                                                PluginType.TRANSFORM.getType(),\n                                                plugin.factoryIdentifier()),\n                                        plugin.optionRule());\n                        return;\n                    }\n                });\n        return plugins;\n    }\n\n    protected List<Factory> getPluginFactories() {\n        List<Factory> factories;\n        if (this.pluginDir.toFile().exists()) {\n            log.debug(\"load plugin from plugin dir: {}\", this.pluginDir);\n            List<URL> files;\n            try {\n                files = FileUtils.searchJarFiles(this.pluginDir);\n            } catch (IOException e) {\n                throw new RuntimeException(\n                        String.format(\n                                \"Can not find any plugin(source/sink/transform) in the dir: %s\",\n                                this.pluginDir));\n            }\n            factories =\n                    FactoryUtil.discoverFactories(new URLClassLoader(files.toArray(new URL[0])));\n        } else {\n            log.warn(\"plugin dir: {} not exists, load plugin from classpath\", this.pluginDir);\n            factories =\n                    FactoryUtil.discoverFactories(Thread.currentThread().getContextClassLoader());\n        }\n        return factories;\n    }\n\n    protected T loadPluginInstance(PluginIdentifier pluginIdentifier, ClassLoader classLoader) {\n        ServiceLoader<T> serviceLoader = ServiceLoader.load(getPluginBaseClass(), classLoader);\n        for (T t : serviceLoader) {\n            if (t instanceof PluginIdentifierInterface) {","sourceCodeStart":359,"sourceCodeEnd":395,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-plugin-discovery/src/main/java/org/apache/seatunnel/plugin/discovery/AbstractPluginDiscovery.java#L359-L395","documentation":"AbstractPluginDiscovery scans the plugin directory for connector jars during plugin discovery. If the plugin directory exists but its jar files cannot be listed due to an IOException (e.g. I/O permission or filesystem errors), it wraps this into a RuntimeException stating no plugins can be found in that dir.","triggerScenarios":"getPluginFactories() is invoked (via factories) while FileUtils.searchJarFiles(this.pluginDir) throws IOException — typically the plugin dir path is a file, unreadable, or an I/O error occurs while walking it.","commonSituations":"SEATUNNEL_HOME misconfigured so connector-plugin points at a non-directory or unreadable path; connectors directory deleted or permission-restricted; network/ACL-mounted plugin dir unavailable at runtime.","solutions":["Verify the connector plugin directory exists, is a directory, and is readable by the SeaTunnel process user","Check SEATUNNEL_HOME and the plugin-dir resolution (options like --plugin-dir) point to the correct install location","Run sh bin/install-plugin.sh to reinstall missing connector jars into the plugin dir","Inspect filesystem permissions/ACLs or mount health on the plugin directory"],"exampleFix":"// before (broken env)\nSEATUNNEL_HOME=/opt/wrong-path bin/seatunnel.sh --config job.conf\n// after\nSEATUNNEL_HOME=/opt/seatunnel bin/seatunnel.sh --config job.conf\n# and ensure $SEATUNNEL_HOME/connectors contains the jars","handlingStrategy":"validation","validationCode":"import os\nfrom pathlib import Path\nplugin_dir = Path(os.environ.get('SEATUNNEL_HOME', '.'), 'connectors')\nif not plugin_dir.is_dir():\n    raise SystemExit(f'Plugin dir missing or not a directory: {plugin_dir}')\nif not any(plugin_dir.glob('*.jar')):\n    raise SystemExit(f'No connector jars found in: {plugin_dir}')","typeGuard":"def plugin_dir_ok(path):\n    p = Path(path)\n    return p.is_dir() and os.access(p, os.R_OK)","tryCatchPattern":null,"preventionTips":["Always run sh bin/install-plugin.sh after installing SeaTunnel","Verify SEATUNNEL_HOME points to the actual install root","Check dir readability under the user running the engine","Keep connector jars in the default $SEATUNNEL_HOME/connectors location"],"tags":["java","plugin-discovery","io","configuration"],"backgroundTag":"directory-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"}