{"record":{"id":"92659ceb4fc1666a","repo":"apache/seatunnel","slug":"remove-invalid-jar-when-inject-jars-into-config","errorCode":null,"errorMessage":"Remove invalid jar when inject jars into config: {}","messagePattern":"Remove invalid jar when inject jars into config: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/execution/FlinkExecution.java","lineNumber":214,"sourceCode":"        jarPaths.addAll(jarDependencies);\n    }\n\n    private Config registerPlugin(Config config, Collection<URL> jars) {\n        config =\n                this.injectJarsToConfig(\n                        config, ConfigUtil.joinPath(\"env\", \"pipeline\", \"jars\"), jars);\n        return this.injectJarsToConfig(\n                config, ConfigUtil.joinPath(\"env\", \"pipeline\", \"classpaths\"), jars);\n    }\n\n    private Config injectJarsToConfig(Config config, String path, Collection<URL> jars) {\n        List<URL> validJars = new ArrayList<>();\n        for (URL jarUrl : jars) {\n            if (new File(jarUrl.getFile()).exists()) {\n                validJars.add(jarUrl);\n                LOGGER.info(\"Inject jar to config: {}\", jarUrl);\n            } else {\n                LOGGER.warn(\"Remove invalid jar when inject jars into config: {}\", jarUrl);\n            }\n        }\n\n        if (config.hasPath(path)) {\n            Set<URL> paths =\n                    Arrays.stream(config.getString(path).split(\";\"))\n                            .map(\n                                    uri -> {\n                                        try {\n                                            return new URL(uri);\n                                        } catch (MalformedURLException e) {\n                                            throw new RuntimeException(\n                                                    \"the uri of jar illegal:\" + uri, e);\n                                        }\n                                    })\n                            .collect(Collectors.toSet());\n            paths.addAll(validJars);\n","sourceCodeStart":196,"sourceCodeEnd":232,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-flink-starter/seatunnel-flink-starter-common/src/main/java/org/apache/seatunnel/core/starter/flink/execution/FlinkExecution.java#L196-L232","documentation":"FlinkExecution.injectJarsToConfig filters the jar URL list before injecting plugin jars into the job config: any URL whose backing file does not exist on the local filesystem is dropped with this warning. This prevents Flink from failing later on a missing classpath entry, but means a requested jar is silently excluded from the job.","triggerScenarios":"registerPlugin -> injectJarsToConfig iterates jar URLs (e.g. from the plugin directory or configured jar list) and a file was deleted, moved, or the URL path does not resolve on the driver node (e.g. cluster vs local path mismatch).","commonSituations":"Plugin directory incomplete after install-plugin.sh; jars referenced from a node where they were not shipped; typos in jar paths; stale URLs after an upgrade that changed connector artifact names.","solutions":["Run sh bin/install-plugin.sh (matching version) to restore missing connector jars under connectors/.","Verify each referenced jar path exists on the machine submitting the job (ls the path from the warning).","Correct or remove the stale jar entry from the config/plugin settings."],"exampleFix":"// before (config references missing jar)\njarPaths = \"/opt/seatunnel/connectors/connector-fake-2.3.x.jar\"\n// after\njarPaths = \"/opt/seatunnel/connectors/connector-console-2.3.x.jar\"  // path verified to exist","handlingStrategy":"validation","validationCode":"for (String jar : jarPaths.split(\";\")) {\n    if (!new java.io.File(jar).exists()) {\n        throw new IllegalStateException(\"Missing jar: \" + jar);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run install-plugin.sh after every SeaTunnel upgrade.","Use absolute, verified paths for plugin jars.","Add a pre-submit check that all referenced jars exist."],"tags":["flink","classpath","jar"],"backgroundTag":"file-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}