apache/beam · error · IllegalArgumentException

Found missing property methods on

Error message

Found missing property methods on [%s]:

What it means

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.

Solutions

  1. Fix every listed property by adding the missing getter/setter with the stated type.
  2. Regenerate accessors via IDE 'Generate Getter and Setter' for each listed property.
  3. Add a startup-time test that validates all project option interfaces via PipelineOptionsFactory to catch these in CI.

Example fix

// before
String getFoo();
int getBar(); // setters missing
// after
String getFoo();
void setFoo(String value);
int getBar();
void setBar(int value);
Defensive patterns

Strategy: validation

Validate before calling

for (java.beans.PropertyDescriptor pd : java.beans.Introspector.getBeanInfo(MyOptions.class).getPropertyDescriptors()) {
  if (pd.getReadMethod() == null || pd.getWriteMethod() == null) {
    System.err.println("Missing " + (pd.getReadMethod() == null ? "getter" : "setter")
        + " for " + pd.getName() + " of type " + pd.getPropertyType());
  }
}

Try / catch

try {
  PipelineOptionsFactory.fromArgs(args).as(MyOptions.class);
} catch (IllegalArgumentException e) {
  if (e.getMessage().contains("Found missing property methods on")) { /* add each listed accessor */ }
  throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: Scaffolding a large options interface quickly with only getters; bulk type changes that broke several setter signatures at once.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/a2fb1b55b1ae7383. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java:1490

          String.format(
              "Expected %s for property [%s] of type [%s] on [%s].",
              missingBeanMethod.methodType,
              missingBeanMethod.property.getName(),
              missingBeanMethod.property.getPropertyType().getName(),
              iface.getName()));
    } else if (missingBeanMethods.size() > 1) {
      StringBuilder builder =
          new StringBuilder(
              String.format("Found missing property methods on [%s]:", iface.getName()));
      for (MissingBeanMethod method : missingBeanMethods) {
        builder.append(
            String.format(
                "%n  - Expected %s for property [%s] of type [%s]",
                method.methodType,
                method.property.getName(),
                method.property.getPropertyType().getName()));
      }
      throw new IllegalArgumentException(builder.toString());
    }
  }

  private static class InconsistentJsonSerializeAndDeserializeAnnotation {
    PropertyDescriptor property;
    boolean hasJsonDeserializeAttribute;
  }

  private static void throwForInconsistentJsonSerializeAndDeserializeAnnotation(
      List<InconsistentJsonSerializeAndDeserializeAnnotation> inconsistentAnnotations)
      throws IllegalArgumentException {
    if (inconsistentAnnotations.isEmpty()) {
      return;
    }

    StringBuilder builder =
        new StringBuilder(
            "Found incorrectly annotated property methods, if a method is annotated with either @JsonSerialize or @JsonDeserialize then it must be annotated with both.");

View on GitHub (pinned to 12126d8942)