apache/beam · error · RuntimeError
not found. Please build the server with \n cd ; ./gradlew
Error message
%s not found. Please build the server with \n cd %s; ./gradlew %s
What it means
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.
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.
Example fix
// before # beam dev version, no local jar FlinkRunner() // after # cd ~/beam && ./gradlew :runners:flink:1.17:job-server:shadowJar FlinkRunner(flink_job_server_jar='/home/me/beam/runners/flink/.../beam-runners-flink-1.17-job-server.jar')
Defensive patterns
Strategy: fallback
Validate before calling
import apache_beam as beam
from apache_beam.utils import subprocess_server
ver = beam.__version__
if '.dev' in ver:
print('Dev version: build the jar locally with ./gradlew <target>') Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Class name must not be empty
- Failed to build package from
- Java is not correctly installed in JAVA_HOME=
- Java must be installed on this system to use this…
- No proto encoding for PaneInfoCoder, always part of…
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/0bfc43c1028ffb76.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/utils/subprocess_server.py:478
return cls._BEAM_SERVICES.replacements[gradle_target]
_, artifact_id = cls.parse_gradle_target(gradle_target, artifact_id)
project_root = os.path.sep.join(
os.path.abspath(__file__).split(os.path.sep)[:-5])
local_path = cls.path_to_dev_beam_jar(
gradle_target, appendix, version, artifact_id)
if os.path.exists(local_path):
_LOGGER.info('Using pre-built snapshot at %s', local_path)
return local_path
maven_repo = maven_repository_url or cls.MAVEN_CENTRAL_REPOSITORY
if 'rc' in version:
# Release candidate
version = version.split('rc')[0]
maven_repo = cls.MAVEN_STAGING_REPOSITORY
elif '.dev' in version:
# TODO: Attempt to use nightly snapshots?
raise RuntimeError(
(
'%s not found. '
'Please build the server with \n cd %s; ./gradlew %s') %
(local_path, os.path.abspath(project_root), gradle_target))
return cls.path_to_maven_jar(
artifact_id, cls.BEAM_GROUP_ID, version, maven_repo, appendix=appendix)
@classmethod
def _download_jar_to_cache(
cls, download_url, cached_jar_path, user_agent=None):
"""Downloads a jar from the given URL to the specified cache path.
Args:
download_url (str): The URL to download from.
cached_jar_path (str): The local path where the jar should be cached.
user_agent (str): The user agent to use when downloading.
"""View on GitHub (pinned to 12126d8942)