apache/beam · error · RuntimeException

Unable to find schema for ${identifier}SchemaTransformProvid

Error message

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

What it means

configFromRow() builds the configuration object from a configuration Row using the schema registered for configurationClass(). When the registry lookup fails with NoSuchSchemaException (no schema registered for the provider's config class), it 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:138

    try {
      SchemaRegistry registry = SchemaRegistry.createDefault();
      SerializableFunction<Row, ConfigT> rowToConfigT =
          registry.getFromRowFunction(configurationClass());

      // Configuration objects handled by the AutoValueSchema provider will expect Row fields with
      // camelCase naming convention
      SchemaProvider schemaProvider = registry.getSchemaProvider(configurationClass());
      if (schemaProvider.getClass().equals(DefaultSchemaProvider.class)
          && checkNotNull(
                  ((DefaultSchemaProvider) schemaProvider)
                      .getUnderlyingSchemaProvider(configurationClass()))
              .getClass()
              .equals(AutoValueSchema.class)) {
        configuration = configuration.toCamelCase();
      }
      return rowToConfigT.apply(configuration);
    } catch (NoSuchSchemaException e) {
      throw new RuntimeException(
          "Unable to find schema for " + identifier() + "SchemaTransformProvider's config");
    }
  }
}

View on GitHub (pinned to 12126d8942)

Solutions

  1. Add @DefaultSchema with a suitable SchemaClass to configurationClass() so it registers with the default SchemaRegistry.
  2. Ensure annotation processing generates AutoValue_/builder classes and they are packaged (check shaded jars).
  3. Test SchemaRegistry.createDefault().getSchema(provider.configurationClass()) directly to confirm registration.
  4. Align Beam versions between pipeline authoring and expansion service to avoid registry/classloader mismatches.

Example fix

// before
abstract class MyConfig { abstract String getName(); }
// after
@DefaultSchema(AutoValueSchema.class)
@AutoValue abstract class MyConfig { abstract String getName(); }
Defensive patterns

Strategy: validation

Validate before calling

try { SchemaRegistry.createDefault().getSchema(provider.configurationClass()); } catch (NoSuchSchemaException e) { throw new IllegalStateException("Config class lacks schema: " + provider.configurationClass(), e); }

Try / catch

try { P p = MyProvider.from(configRow); } catch (RuntimeException e) { if (e.getMessage().contains("Unable to find schema")) { /* fix schema registration before expansion */ } throw e; }

Prevention

When it happens

Trigger: Calling TypedSchemaTransformProvider.from(configRow) (or dependencies()) for a provider whose configuration class has no schema in the default registry — same root cause as configurationSchema() failing.

Common situations: Custom SchemaTransformProvider implementations without @DefaultSchema on their config class; YAML/SQL expansion pipelines constructing providers whose config classes lost schema registration (annotation processing not run, shading dropping generated classes).

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/ec598dd3994522f8. Report an issue: GitHub.