{"record":{"id":"0bfc43c1028ffb76","repo":"apache/beam","slug":"s-not-found-please-build-the-server-with-n-cd-s-gradlew-s","errorCode":null,"errorMessage":"%s not found. Please build the server with \\n  cd %s; ./gradlew %s","messagePattern":"(.+?) not found\\. Please build the server with \\\\n  cd (.+?); \\./gradlew (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/utils/subprocess_server.py","lineNumber":478,"sourceCode":"      return cls._BEAM_SERVICES.replacements[gradle_target]\n\n    _, artifact_id = cls.parse_gradle_target(gradle_target, artifact_id)\n    project_root = os.path.sep.join(\n        os.path.abspath(__file__).split(os.path.sep)[:-5])\n    local_path = cls.path_to_dev_beam_jar(\n        gradle_target, appendix, version, artifact_id)\n    if os.path.exists(local_path):\n      _LOGGER.info('Using pre-built snapshot at %s', local_path)\n      return local_path\n\n    maven_repo = maven_repository_url or cls.MAVEN_CENTRAL_REPOSITORY\n    if 'rc' in version:\n      # Release candidate\n      version = version.split('rc')[0]\n      maven_repo = cls.MAVEN_STAGING_REPOSITORY\n    elif '.dev' in version:\n      # TODO: Attempt to use nightly snapshots?\n      raise RuntimeError(\n          (\n              '%s not found. '\n              'Please build the server with \\n  cd %s; ./gradlew %s') %\n          (local_path, os.path.abspath(project_root), gradle_target))\n\n    return cls.path_to_maven_jar(\n        artifact_id, cls.BEAM_GROUP_ID, version, maven_repo, appendix=appendix)\n\n  @classmethod\n  def _download_jar_to_cache(\n      cls, download_url, cached_jar_path, user_agent=None):\n    \"\"\"Downloads a jar from the given URL to the specified cache path.\n    \n    Args:\n      download_url (str): The URL to download from.\n      cached_jar_path (str): The local path where the jar should be cached.\n      user_agent (str): The user agent to use when downloading.\n    \"\"\"","sourceCodeStart":460,"sourceCodeEnd":496,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/utils/subprocess_server.py#L460-L496","documentation":"path_to_beam_jar() normally locates a prebuilt Beam jar locally or falls back to a Maven repository. For a '.dev' (development/snapshot) version there is no remote artifact, so it immediately raises, telling you to build the jar yourself with gradlew and the given gradle target.","triggerScenarios":"Using a .dev0/.devN Beam Python version (e.g. installed from git or a nightly) and invoking code that needs a Java job-server jar (Flink, Spark, expansion service) without the jar present in the local beam build output.","commonSituations":"Developers running Beam from a source checkout or nightly wheels; missing 'python -m pip install -e sdks/python' + './gradlew :runners:flink:1.17:job-server:shadowJar' build step; version mismatch between Python dev version and available Maven artifacts.","solutions":["Build the required jar: cd <beam-project-root>; ./gradlew <gradle_target> (printed in the error).","Alternatively pass the path to a prebuilt jar via the runner's jar option (e.g. --flink_job_server_jar or expansion service jar argument).","Or install a released Beam version (pip install apache-beam==X.Y.Z) whose jars exist on Maven Central.","For .dev use with remote execution, use the nightly Maven snapshots manually and point the server to that jar."],"exampleFix":"// before\n# beam dev version, no local jar\nFlinkRunner()\n// after\n# cd ~/beam && ./gradlew :runners:flink:1.17:job-server:shadowJar\nFlinkRunner(flink_job_server_jar='/home/me/beam/runners/flink/.../beam-runners-flink-1.17-job-server.jar')","handlingStrategy":"fallback","validationCode":"import apache_beam as beam\nfrom apache_beam.utils import subprocess_server\nver = beam.__version__\nif '.dev' in ver:\n    print('Dev version: build the jar locally with ./gradlew <target>')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build job-server jars when running from source ('./gradlew :runners:flink:1.17:job-server:shadowJar')","Pass explicit jar paths to runners on dev builds","Prefer released apache-beam versions in CI","Keep Beam Python and Java artifacts version-aligned"],"tags":["python","java","build","missing-artifact","apache-beam"],"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"}