{"record":{"id":"03b17f5a13380cea","repo":"apache/beam","slug":"unable-to-find-schema-for-identifier-schematransformprovider","errorCode":null,"errorMessage":"Unable to find schema for ${identifier} SchemaTransformProvider's configuration.","messagePattern":"Unable to find schema for (.+?) SchemaTransformProvider's configuration\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/transforms/TypedSchemaTransformProvider.java","lineNumber":98,"sourceCode":"   */\n  protected abstract SchemaTransform from(ConfigT configuration);\n\n  /**\n   * List the dependencies needed for this transform. Jars from classpath are used by default when\n   * Optional.empty() is returned.\n   */\n  Optional<List<String>> dependencies(ConfigT configuration, PipelineOptions options) {\n    return Optional.empty();\n  }\n\n  @Override\n  public final Schema configurationSchema() {\n    try {\n      // Sort the fields by name to ensure a consistent schema is produced\n      // We also establish a `snake_case` convention for all SchemaTransform configurations\n      return SchemaRegistry.createDefault().getSchema(configurationClass()).sorted().toSnakeCase();\n    } catch (NoSuchSchemaException e) {\n      throw new RuntimeException(\n          \"Unable to find schema for \"\n              + identifier()\n              + \" SchemaTransformProvider's configuration.\");\n    }\n  }\n\n  /**\n   * Produces a {@link SchemaTransform} from a Row configuration. Row fields are expected to have\n   * `snake_case` naming convention.\n   */\n  @Override\n  public final SchemaTransform from(Row configuration) {\n    return from(configFromRow(configuration));\n  }\n\n  @Override\n  public final Optional<List<String>> dependencies(Row configuration, PipelineOptions options) {\n    return dependencies(configFromRow(configuration), options);","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/transforms/TypedSchemaTransformProvider.java#L80-L116","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Annotate configurationClass() with @DefaultSchema(JavaBeanSchema.class) (or AutoValueSchema/AvroSchema as appropriate).","Ensure the configuration class is a supported schema type with accessible getters/fields.","Verify SchemaRegistry.createDefault() can getSchema(clazz) in a unit test for the provider.","If using AutoValue, confirm the generated AutoValue_ class is on the classpath and annotation processing ran."],"exampleFix":"// before\npublic static class MyConfig { private String field; }\n// after\n@DefaultSchema(JavaBeanSchema.class)\npublic static class MyConfig { public String getField() {...} public void setField(String f) {...} }","handlingStrategy":"validation","validationCode":"try { SchemaRegistry.createDefault().getSchema(provider.configurationClass()); } catch (NoSuchSchemaException e) { throw new IllegalStateException(\"Add @DefaultSchema to \" + provider.configurationClass(), e); }","typeGuard":null,"tryCatchPattern":"try { Schema s = provider.configurationSchema(); } catch (RuntimeException e) { if (e.getMessage().contains(\"Unable to find schema\")) { /* annotate config class and re-try */ } throw e; }","preventionTips":["Always annotate TypedSchemaTransformProvider config classes with @DefaultSchema","Unit-test configurationSchema() for every custom provider","Verify annotation processing output (AutoValue classes) is packaged"],"tags":["java","apache-beam","schematransform","schema-registry"],"backgroundTag":"resource-not-found","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"}