apache/beam · error · RuntimeException

Unable to find schema for ${identifier} SchemaTransformProvi

Error message

Unable to find schema for ${identifier} SchemaTransformProvider's configuration.

What it means

TypedSchemaTransformProvider.configurationSchema() derives the provider's configuration Schema from configurationClass() via the default SchemaRegistry (sorted, snake_case). If no schema is registered for the configuration class, NoSuchSchemaException is rethrown as a RuntimeException naming the provider's identifier.

Source

Thrown at sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/transforms/TypedSchemaTransformProvider.java:98

   */
  protected abstract SchemaTransform from(ConfigT configuration);

  /**
   * List the dependencies needed for this transform. Jars from classpath are used by default when
   * Optional.empty() is returned.
   */
  Optional<List<String>> dependencies(ConfigT configuration, PipelineOptions options) {
    return Optional.empty();
  }

  @Override
  public final Schema configurationSchema() {
    try {
      // Sort the fields by name to ensure a consistent schema is produced
      // We also establish a `snake_case` convention for all SchemaTransform configurations
      return SchemaRegistry.createDefault().getSchema(configurationClass()).sorted().toSnakeCase();
    } catch (NoSuchSchemaException e) {
      throw new RuntimeException(
          "Unable to find schema for "
              + identifier()
              + " SchemaTransformProvider's configuration.");
    }
  }

  /**
   * Produces a {@link SchemaTransform} from a Row configuration. Row fields are expected to have
   * `snake_case` naming convention.
   */
  @Override
  public final SchemaTransform from(Row configuration) {
    return from(configFromRow(configuration));
  }

  @Override
  public final Optional<List<String>> dependencies(Row configuration, PipelineOptions options) {
    return dependencies(configFromRow(configuration), options);

View on GitHub (pinned to 12126d8942)

Solutions

  1. Annotate configurationClass() with @DefaultSchema(JavaBeanSchema.class) (or AutoValueSchema/AvroSchema as appropriate).
  2. Ensure the configuration class is a supported schema type with accessible getters/fields.
  3. Verify SchemaRegistry.createDefault() can getSchema(clazz) in a unit test for the provider.
  4. If using AutoValue, confirm the generated AutoValue_ class is on the classpath and annotation processing ran.

Example fix

// before
public static class MyConfig { private String field; }
// after
@DefaultSchema(JavaBeanSchema.class)
public static class MyConfig { public String getField() {...} public void setField(String f) {...} }
Defensive patterns

Strategy: validation

Validate before calling

try { SchemaRegistry.createDefault().getSchema(provider.configurationClass()); } catch (NoSuchSchemaException e) { throw new IllegalStateException("Add @DefaultSchema to " + provider.configurationClass(), e); }

Try / catch

try { Schema s = provider.configurationSchema(); } catch (RuntimeException e) { if (e.getMessage().contains("Unable to find schema")) { /* annotate config class and re-try */ } throw e; }

Prevention

When it happens

Trigger: A SchemaTransformProvider whose configurationClass() has no registered schema — e.g. the class is not annotated with @DefaultSchema, not a supported POJO/AutoValue/Avro type, or SchemaRegistry auto-registration failed at class load.

Common situations: Implementing a custom TypedSchemaTransformProvider with a configuration class lacking schema annotations, or after Beam upgrade where the default registry no longer infers the class's schema.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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