{"record":{"id":"70166bd6311bb2e3","repo":"apache/beam","slug":"argconfig-beam-version-arg-name-argument-must-be-specified","errorCode":null,"errorMessage":"\"{ArgConfig.BEAM_VERSION_ARG_NAME}\" argument must be specified.","messagePattern":"\"(.+?)\" argument must be specified\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/transform-service/launcher/src/main/java/org/apache/beam/sdk/transformservice/launcher/TransformServiceLauncher.java","lineNumber":380,"sourceCode":"    } catch (CmdLineException e) {\n      System.err.println(e.getMessage());\n      System.err.println(\"Valid options are:\");\n      // print the list of available options\n      parser.printUsage(System.err);\n      System.err.println();\n\n      return;\n    }\n\n    if (config.command.isEmpty()) {\n      throw new IllegalArgumentException(\n          \"\\\"\"\n              + ArgConfig.COMMAND_ARG_NAME\n              + \"\\\" argument must be specified, Valid values are \"\n              + COMMAND_POSSIBLE_VALUES);\n    }\n    if (config.beamVersion.isEmpty()) {\n      throw new IllegalArgumentException(\n          \"\\\"\" + ArgConfig.BEAM_VERSION_ARG_NAME + \"\\\" argument must be specified.\");\n    }\n\n    System.out.println(\"===================================================\");\n    System.out.println(\n        \"Starting the Beam Transform Service at \"\n            + (config.port < 0\n                ? \"the default port.\"\n                : (\"port \" + Integer.toString(config.port) + \".\")));\n    System.out.println(\"===================================================\");\n\n    String pythonRequirementsFile =\n        !config.pythonRequirementsFile.isEmpty() ? config.pythonRequirementsFile : null;\n\n    TransformServiceLauncher service =\n        TransformServiceLauncher.forProject(\n            config.projectName, config.port, pythonRequirementsFile);\n    if (!config.beamVersion.isEmpty()) {","sourceCodeStart":362,"sourceCodeEnd":398,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/transform-service/launcher/src/main/java/org/apache/beam/sdk/transformservice/launcher/TransformServiceLauncher.java#L362-L398","documentation":"Immediately after validating the command, main() requires a Beam version (ArgConfig.BEAM_VERSION_ARG_NAME) used to select/pull the matching transform-service image. If config.beamVersion is empty, it throws this IllegalArgumentException.","triggerScenarios":"Running the launcher main with --command provided but without the Beam version argument, or providing an empty value for it.","commonSituations":"Scripts templated with an unset ${BEAM_VERSION} variable expanding to empty; forgetting the flag when upgrading; flag name typo so the value never lands in config.beamVersion.","solutions":["Pass the Beam version explicitly, e.g. --beam_version=2.59.0, matching your Beam SDK version.","Fix any shell variable interpolation so the version value is not empty.","Check usage output for the exact argument name (ArgConfig.BEAM_VERSION_ARG_NAME)."],"exampleFix":"// before (shell)\njava -jar launcher.jar --command=up --beam_version=\"\"\n\n// after (shell)\njava -jar launcher.jar --command=up --beam_version=2.59.0","handlingStrategy":"validation","validationCode":"String beamVersion = System.getenv().getOrDefault(\"BEAM_VERSION\", \"\");\nif (beamVersion.isEmpty())\n  throw new IllegalArgumentException(\"BEAM_VERSION must be set before invoking the launcher\");","typeGuard":null,"tryCatchPattern":"try {\n  TransformServiceLauncher.main(rawArgs);\n} catch (IllegalArgumentException e) {\n  System.err.println(\"Launcher arg problem: \" + e.getMessage());\n}","preventionTips":["Pin the Beam version in your deployment scripts (set -u so unset vars fail).","Match the launcher's beam_version to your Beam SDK version.","Default empty shell variables to an error rather than an empty string."],"tags":["java","cli","missing-argument","validation"],"backgroundTag":"missing-required-argument","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"}