{"record":{"id":"8dee5fb9ab1f8f03","repo":"apache/beam","slug":"class-s-missing-a-property-named-s-did-you-mean-one-of-s","errorCode":null,"errorMessage":"Class %s missing a property named '%s'. Did you mean one of %s?","messagePattern":"Class (.+?) missing a property named '(.+?)'\\. Did you mean one of (.+?)\\?","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java","lineNumber":1902,"sourceCode":"        // Search for close matches for missing properties.\n        // Either off by one or off by two character errors.\n        if (!propertyNamesToGetters.containsKey(entry.getKey())) {\n          SortedSet<String> closestMatches =\n              new TreeSet<>(\n                  Sets.filter(\n                      propertyNamesToGetters.keySet(),\n                      input -> StringUtils.getLevenshteinDistance(entry.getKey(), input) <= 2));\n          switch (closestMatches.size()) {\n            case 0:\n              throw new IllegalArgumentException(\n                  String.format(\"Class %s missing a property named '%s'.\", klass, entry.getKey()));\n            case 1:\n              throw new IllegalArgumentException(\n                  String.format(\n                      \"Class %s missing a property named '%s'. Did you mean '%s'?\",\n                      klass, entry.getKey(), Iterables.getOnlyElement(closestMatches)));\n            default:\n              throw new IllegalArgumentException(\n                  String.format(\n                      \"Class %s missing a property named '%s'. Did you mean one of %s?\",\n                      klass, entry.getKey(), closestMatches));\n          }\n        }\n        Method method = propertyNamesToGetters.get(entry.getKey());\n        // Only allow empty argument values for String, String Array, and\n        // Collection<String>.\n        Class<?> returnType = method.getReturnType();\n        JavaType type = MAPPER.getTypeFactory().constructType(method.getGenericReturnType());\n\n        if (\"runner\".equals(entry.getKey())) {\n          String runner = Iterables.getOnlyElement(entry.getValue());\n          final Map<String, Class<? extends PipelineRunner<?>>> pipelineRunners =\n              cache.supportedPipelineRunners;\n          if (pipelineRunners.containsKey(runner.toLowerCase())) {\n            convertedOptions.put(\"runner\", pipelineRunners.get(runner.toLowerCase(ROOT)));\n          } else {","sourceCodeStart":1884,"sourceCodeEnd":1920,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java#L1884-L1920","documentation":"Same missing-property error, but multiple existing properties matched within Levenshtein distance 2, so the message lists all candidates: 'Did you mean one of [...]?'. Thrown during option name resolution in PipelineOptionsFactory.","triggerScenarios":"Providing an option key that is ambiguous or misspelled near several real properties of the options class (edit distance <= 2 to more than one property).","commonSituations":"Misspelling a property in a family of similarly named options (e.g., zone/region/project style prefixes); programmatic option maps with stale keys.","solutions":["Pick the correct property from the listed suggestions and fix the key","Print all properties with --help=<class> and verify against your call site","Remove the unknown key if it is no longer supported by the options class"],"exampleFix":"// before\noptions.setTempLocatio(\"gs://bucket/tmp\");\n// after\noptions.setTempLocation(\"gs://bucket/tmp\");","handlingStrategy":"validation","validationCode":"if (!knownProps.contains(key)) {\n  List<String> close = Levenshtein.closest(knownProps, key, 2);\n  throw new IllegalArgumentException(\"Unknown option \" + key + \"; did you mean \" + close + \"?\");\n}","typeGuard":null,"tryCatchPattern":"catch (IllegalArgumentException e) { /* parse suggestions from message and retry with corrected key */ }","preventionTips":["Validate option maps against the interface's property set before creating the pipeline","Centralize option keys in an enum/constants class"],"tags":["java","apache-beam","cli","typo","pipeline-options"],"backgroundTag":"invalid-cli-argument","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}