{"record":{"id":"edc4f8419ce5cf79","repo":"apache/beam","slug":"unable-to-parse-jar-url-s-if-using-a-full-url-make-sure-the-edc4f8","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_uber_jar_job_server.py","lineNumber":71,"sourceCode":"        options.view_as(pipeline_options.JobServerOptions).artifact_port)\n    self._temp_dir = tempfile.mkdtemp(prefix='apache-beam-flink')\n\n  def start(self):\n    return self\n\n  def stop(self):\n    pass\n\n  def executable_jar(self):\n    if self._executable_jar:\n      if not os.path.exists(self._executable_jar):\n        parsed = urllib.parse.urlparse(self._executable_jar)\n        if not parsed.scheme:\n          try:\n            flink_version = self.flink_version()\n          except Exception:\n            flink_version = '$FLINK_VERSION'\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._executable_jar, flink_version))\n      url = self._executable_jar\n    else:\n      url = job_server.JavaJarJobServer.path_to_beam_jar(\n          ':runners:flink:%s:job-server:shadowJar' % self.flink_version())\n    return job_server.JavaJarJobServer.local_jar(\n        url, user_agent=self._user_agent)\n\n  def flink_version(self):\n    full_version = requests.get(\n        '%s/v1/config' % self._master_url, timeout=60).json()['flink-version']\n    # Only return up to minor version.\n    return '.'.join(full_version.split('.')[:2])\n","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/portability/flink_uber_jar_job_server.py#L53-L89","documentation":"FlinkUberJarJobServer.executable_jar validates the configured job-server jar: if the path does not exist on disk and is not a URL with a scheme, it raises ValueError. It first attempts flink_version() to interpolate a concrete version into the gradle build hint, falling back to the literal '$FLINK_VERSION' if that probe fails.","triggerScenarios":"Constructing/using FlinkUberJarJobServer with an executable_jar that neither exists locally nor has a URL scheme; the '$FLINK_VERSION' placeholder in the message means even the version probe failed (jar absent).","commonSituations":"Passing --flink_job_server_jar a path where the shadowJar was never built; version mismatch between installed Flink and the built job-server jar; jobservers on machines without gradle builds.","solutions":["Build the matching jar: `./gradlew runners:flink:<version>:job-server:shadowJar` and point executable_jar at it.","Supply a full URL with scheme (file:///path or http://...) if the jar lives remotely.","Check the configured path exists and matches the cluster's Flink version."],"exampleFix":"// before\nFlinkUberJarJobServer(master_url=..., executable_jar='/opt/beam/job-server.jar')\n// after\nFlinkUberJarJobServer(\n    master_url=...,\n    executable_jar='file:///opt/beam/beam-runners-flink-1.17-job-server.jar')","handlingStrategy":"validation","validationCode":"import os\njar = executable_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    server = FlinkUberJarJobServer(master_url=..., executable_jar=jar)\n    server.create_beam_job(...)\nexcept ValueError as e:\n    if 'Unable to parse jar URL' in str(e):\n        build_job_server_jar()\n        server = FlinkUberJarJobServer(\n            master_url=..., executable_jar=built_jar_path())\n    else:\n        raise","preventionTips":["Verify the shadowJar exists on the machine launching the job server.","Match the job-server jar's Flink version to the cluster version.","Use a file:// or http:// URL if the jar is fetched remotely."],"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"}