{"record":{"id":"a78db9f778e43680","repo":"apache/beam","slug":"cannot-start-an-expansion-service-since-neither-java-nor","errorCode":null,"errorMessage":"Cannot start an expansion service since neither Java nor Docker executables are available in the system.","messagePattern":"Cannot start an expansion service since neither Java nor Docker executables are available in the system\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/transforms/external.py","lineNumber":1262,"sourceCode":"    else:\n      error_append = 'a Java expansion service was not provided.'\n\n    project_name = str(uuid.uuid4())\n    port = subprocess_server.pick_port(None)[0]\n\n    logging.info(\n        'Trying to expand the external transform using the Docker Compose '\n        'based transform service since %s. Transform service will be under '\n        'Docker Compose project name %s and will be made available at port %r.'\n        % (error_append, project_name, str(port)))\n\n    from apache_beam import version as beam_version\n    beam_version = beam_version.__version__\n\n    return transform_service_launcher.TransformServiceLauncher(\n        project_name, port, beam_version, user_agent)\n  else:\n    raise ValueError(\n        'Cannot start an expansion service since neither Java nor '\n        'Docker executables are available in the system.')\n\n\ndef _sanitize_java_traceback(s):\n  \"\"\"Attempts to highlight the root cause in the error string.\n\n  Java tracebacks read bottom to top, while Python tracebacks read top to\n  bottom, resulting in the actual error message getting sandwiched between two\n  walls of text.  This may result in the error being duplicated (as we don't\n  want to remove relevant information) but should be clearer in most cases.\n\n  Best-effort but non-destructive.\n  \"\"\"\n  # We delete non-java-traceback lines.\n  traceback_lines = [\n      r'\\tat \\S+\\(\\S+\\.java:\\d+\\)',\n      r'\\t\\.\\.\\. \\d+ more',","sourceCodeStart":1244,"sourceCodeEnd":1280,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/transforms/external.py#L1244-L1280","documentation":"Beam attempted to auto-start a Docker-Compose-based transform service because no Java expansion service was provided, but neither a Java nor a Docker executable exists on the machine, so no service can be launched and expansion falls through to this final error.","triggerScenarios":"Thrown at sdks/python/apache_beam/transforms/external.py:1262 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install a JRE/JDK (java on PATH) so the expansion service jar can run","Or install Docker so the containerized transform service can be used","Or run a remote expansion service and pass its endpoint explicitly"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}