{"record":{"id":"c766be4532af74fd","repo":"apache/beam","slug":"unable-to-parse-jar-url-s-if-using-a-full-url-make-sure-the-c766be","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 -Pwith-kafka-streams-runner runners:kafka-streams: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 -Pwith-kafka-streams-runner runners:kafka-streams:job-server:shadowJar`\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/runners/portability/kafka_streams_runner.py","lineNumber":99,"sourceCode":"    if options_str not in JOB_SERVER_CACHE:\n      JOB_SERVER_CACHE[options_str] = job_server.StopOnExitJobServer(\n          KafkaStreamsJarJobServer(options))\n    return JOB_SERVER_CACHE[options_str]\n\n\nclass KafkaStreamsJarJobServer(job_server.JavaJarJobServer):\n  def __init__(self, options):\n    super().__init__(options)\n    kafka_streams_options = options.view_as(\n        pipeline_options.KafkaStreamsRunnerOptions)\n    self._jar = kafka_streams_options.kafka_streams_job_server_jar\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 -Pwith-kafka-streams-runner '\n              'runners:kafka-streams:job-server:shadowJar`.' % self._jar)\n      return self._jar\n\n    # No jar was given, so look for one built from this source tree. The base\n    # class would fall back to Maven Central, but the job server is not\n    # published for any Beam release, so that download always fails and says\n    # nothing useful about why.\n    local_jar = subprocess_server.JavaJarServer.path_to_dev_beam_jar(\n        ':runners:kafka-streams:job-server:shadowJar')\n    if os.path.exists(local_jar):\n      return local_jar\n    raise RuntimeError(\n        'The Kafka Streams runner is experimental and is not part of any '\n        'Apache Beam release, so there is no published job server jar to '","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/runners/portability/kafka_streams_runner.py#L81-L117","documentation":"KafkaStreamsRunner's path_to_jar validates the --kafka_streams_job_server_jar option. If the value doesn't exist as a local file, it's treated as a URL — but if URL parsing finds no scheme, the option is neither a valid path nor a valid URL, so it raises ValueError with guidance on building the job server jar.","triggerScenarios":"Passing --kafka_streams_job_server_jar a typo'd path (file doesn't exist) or a path-like string with no scheme and no file at that location, e.g. 'kafka/target/job.jar' that was never built.","commonSituations":"Forgetting to build the job server shadowJar with Gradle first; running from a pip-installed Beam where the jar isn't bundled; typos or relative paths that don't resolve from the current working directory.","solutions":["Build the jar: ./gradlew -Pwith-kafka-streams-runner runners:kafka-streams:job-server:shadowJar and pass the produced path.","If it's a URL, include the scheme, e.g. file:///path/to/job-server.jar or https://...","Verify the path with ls/os.path.exists and run from the directory you expect.","Use an absolute path for the jar."],"exampleFix":"// before\n--kafka_streams_job_server_jar=runners/kafka-streams/job-server/build/libs/job.jar\n// after\n--kafka_streams_job_server_jar=/abs/path/beam/runners/kafka-streams/job-server/build/libs/beam-runners-kafka-streams-job-server-2.xx.0-SNAPSHOT.jar","handlingStrategy":"validation","validationCode":"import os, urllib.parse\njar = options.kafka_streams_job_server_jar\nassert jar and (os.path.exists(jar) or urllib.parse.urlparse(jar).scheme)","typeGuard":"def jar_resolves(v): return bool(v) and (os.path.exists(v) or bool(urllib.parse.urlparse(v).scheme))","tryCatchPattern":"try:\n    jar = runner.path_to_jar()\nexcept ValueError as e:\n    build_jar_with_gradle()","preventionTips":["Build the shadowJar before first run","Use absolute paths for local jars","Include the scheme for URL-form jar options"],"tags":["config","cli","file-not-found","kafka"],"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-20T03:17:13.778Z"}