{"record":{"id":"8cdc7698669b085c","repo":"apache/beam","slug":"unable-to-parse-jar-url-s-if-using-a-full-url-make-sure-the","errorCode":null,"errorMessage":"Unable to parse jar URL \"%s\". If using a full URL, make sure the scheme is specified. If using a local file path, make sure the file exists; you may have to first build the job server using `./gradlew runners:flink:%s:job-server:shadowJar`.","messagePattern":"Unable to parse jar URL \"(.+?)\"\\. If using a full URL, make sure the scheme is specified\\. If using a local file path, make sure the file exists; you may have to first build the job server using `\\./gradlew runners:flink:(.+?):job-server:shadowJar`\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/portability/flink_runner.py","lineNumber":102,"sourceCode":"          flink_master)\n      flink_master = 'http://' + flink_master\n    return flink_master\n\n\nclass FlinkJarJobServer(job_server.JavaJarJobServer):\n  def __init__(self, options):\n    super().__init__(options)\n    options = options.view_as(pipeline_options.FlinkRunnerOptions)\n    self._jar = options.flink_job_server_jar\n    self._master_url = options.flink_master\n    self._flink_version = options.flink_version\n\n  def path_to_jar(self):\n    if self._jar:\n      if not os.path.exists(self._jar):\n        url = urllib.parse.urlparse(self._jar)\n        if not url.scheme:\n          raise ValueError(\n              'Unable to parse jar URL \"%s\". If using a full URL, make sure '\n              'the scheme is specified. If using a local file path, make sure '\n              'the file exists; you may have to first build the job server '\n              'using `./gradlew runners:flink:%s:job-server:shadowJar`.' %\n              (self._jar, self._flink_version))\n      return self._jar\n    else:\n      return self.path_to_beam_jar(\n          ':runners:flink:%s:job-server:shadowJar' % self._flink_version)\n\n  def java_arguments(\n      self, job_port, artifact_port, expansion_port, artifacts_dir):\n    return [\n        '--flink-master',\n        self._master_url,\n        '--artifacts-dir',\n        artifacts_dir,\n        '--job-port',","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/portability/flink_runner.py#L84-L120","documentation":"FlinkRunnerOptions.path_to_jar resolves the Flink job-server jar. If the configured jar path does not exist on disk, the code treats it as possibly a URL; with no URL scheme it can be neither a file nor a URL, so it raises ValueError and hints at the gradle build command.","triggerScenarios":"Running a Flink pipeline with --flink_job_server_jar (or a default path) pointing to a nonexistent local file that contains no '://' scheme — typically a jar that was never built.","commonSituations":"Fresh checkout without building `./gradlew runners:flink:<version>:job-server:shadowJar`; typo in the jar path; Flink version changed so the versioned jar filename no longer matches.","solutions":["Build the job server: `./gradlew runners:flink:<flink_version>:job-server:shadowJar`.","Pass --flink_job_server_jar with an existing absolute path, or a full URL including a scheme (file:///, http://).","Verify the path exists (ls/os.path.exists) and fix typos or stale version numbers."],"exampleFix":"// before\n--flink_job_server_jar /opt/flink/job-server.jar  # missing file, no scheme\n// after\n./gradlew runners:flink:1.17:job-server:shadowJar\n--flink_job_server_jar /opt/beam/beam-runners-flink-1.17-job-server.jar","handlingStrategy":"validation","validationCode":"import os\njar = pipeline_options.view_as(FlinkRunnerOptions).flink_job_server_jar\nif jar and not os.path.exists(jar) and '://' not in jar:\n    raise FileNotFoundError(\n        f\"build it: ./gradlew runners:flink:<ver>:job-server:shadowJar ({jar})\")","typeGuard":null,"tryCatchPattern":"try:\n    run_flink_pipeline(options)\nexcept ValueError as e:\n    if 'Unable to parse jar URL' in str(e):\n        build_job_server_jar()  # gradle shadowJar\n        run_flink_pipeline(options)\n    else:\n        raise","preventionTips":["Build the flink job-server shadowJar before first run.","Pass an absolute, existing path or a full URL with scheme for --flink_job_server_jar.","Rebuild the jar when bumping the Flink version."],"tags":["python","apache-beam","flink","config","jar"],"backgroundTag":"file-not-found","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}