{"record":{"id":"a2fb1b55b1ae7383","repo":"apache/beam","slug":"found-missing-property-methods-on-s","errorCode":null,"errorMessage":"Found missing property methods on [%s]:","messagePattern":"Found missing property methods on \\[(.+?)\\]:","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java","lineNumber":1490,"sourceCode":"          String.format(\n              \"Expected %s for property [%s] of type [%s] on [%s].\",\n              missingBeanMethod.methodType,\n              missingBeanMethod.property.getName(),\n              missingBeanMethod.property.getPropertyType().getName(),\n              iface.getName()));\n    } else if (missingBeanMethods.size() > 1) {\n      StringBuilder builder =\n          new StringBuilder(\n              String.format(\"Found missing property methods on [%s]:\", iface.getName()));\n      for (MissingBeanMethod method : missingBeanMethods) {\n        builder.append(\n            String.format(\n                \"%n  - Expected %s for property [%s] of type [%s]\",\n                method.methodType,\n                method.property.getName(),\n                method.property.getPropertyType().getName()));\n      }\n      throw new IllegalArgumentException(builder.toString());\n    }\n  }\n\n  private static class InconsistentJsonSerializeAndDeserializeAnnotation {\n    PropertyDescriptor property;\n    boolean hasJsonDeserializeAttribute;\n  }\n\n  private static void throwForInconsistentJsonSerializeAndDeserializeAnnotation(\n      List<InconsistentJsonSerializeAndDeserializeAnnotation> inconsistentAnnotations)\n      throws IllegalArgumentException {\n    if (inconsistentAnnotations.isEmpty()) {\n      return;\n    }\n\n    StringBuilder builder =\n        new StringBuilder(\n            \"Found incorrectly annotated property methods, if a method is annotated with either @JsonSerialize or @JsonDeserialize then it must be annotated with both.\");","sourceCodeStart":1472,"sourceCodeEnd":1508,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java#L1472-L1508","documentation":"The aggregated variant of the missing-bean-method error: when multiple properties on an interface lack their required getter or setter, Beam throws one message 'Found missing property methods on [%s]:' listing each '%n - Expected %s for property [%s] of type [%s]' line before failing registration.","triggerScenarios":"PipelineOptionsFactory registration when throwForMissingBeanMethod receives missingBeanMethods.size() > 1; each entry contributes a line naming the missing method type, property, and type before the IllegalArgumentException is thrown.","commonSituations":"Scaffolding a large options interface quickly with only getters; bulk type changes that broke several setter signatures at once.","solutions":["Fix every listed property by adding the missing getter/setter with the stated type.","Regenerate accessors via IDE 'Generate Getter and Setter' for each listed property.","Add a startup-time test that validates all project option interfaces via PipelineOptionsFactory to catch these in CI."],"exampleFix":"// before\nString getFoo();\nint getBar(); // setters missing\n// after\nString getFoo();\nvoid setFoo(String value);\nint getBar();\nvoid setBar(int value);","handlingStrategy":"validation","validationCode":"for (java.beans.PropertyDescriptor pd : java.beans.Introspector.getBeanInfo(MyOptions.class).getPropertyDescriptors()) {\n  if (pd.getReadMethod() == null || pd.getWriteMethod() == null) {\n    System.err.println(\"Missing \" + (pd.getReadMethod() == null ? \"getter\" : \"setter\")\n        + \" for \" + pd.getName() + \" of type \" + pd.getPropertyType());\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  PipelineOptionsFactory.fromArgs(args).as(MyOptions.class);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"Found missing property methods on\")) { /* add each listed accessor */ }\n  throw e;\n}","preventionTips":["Fix all properties listed in the aggregated message before re-running","Use IDE bean-method generation when scaffolding large options interfaces","Validate every options interface in a startup or CI test"],"tags":["java","apache-beam","pipeline-options","bean-property"],"backgroundTag":"missing-required-config-field","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"}