apache/beam · error · RuntimeException

{e.getMessage()}

Error message

{e.getMessage()}

What it means

getAllProviders wraps the entire ServiceLoader-based provider discovery in a catch-all that rethrows any exception as RuntimeException(e.getMessage()) — losing the stack trace and original type. Any failure while loading/instantiating a SchemaTransformProvider (e.g. a provider's constructor throwing, ServiceLoader configuration errors) surfaces with only the original message.

Solutions

  1. Look at the server logs/stack trace above this message to find the root exception and fix the failing provider.
  2. Check META-INF/services/org.apache.beam.sdk.schemas.transforms.providers.SchemaTransformProvider entries for classes that are absent or broken.
  3. Ensure the provider's required dependencies are on the runtime classpath.
  4. Temporarily remove suspect provider jars to isolate which one fails discovery.

Example fix

// before (provider code)
public MyProvider() { loadHeavyNativeLib(); } // throws
// after: defer heavy init until first use, or fix missing dependency
Defensive patterns

Strategy: try-catch

Validate before calling

for (SchemaTransformProvider p : ServiceLoader.load(SchemaTransformProvider.class)) { p.identifier(); p.configurationSchema(); /* forces init */ }

Try / catch

try { provider = ManagedSchemaTransformProvider.of(id); } catch (RuntimeException e) { throw new IllegalStateException("Provider discovery failed: " + e.getMessage(), e); // re-wrap preserving nothing lost upstream }

Prevention

When it happens

Trigger: ServiceLoader.load(SchemaTransformProvider.class) iterates providers during getAllProviders (triggered by schemaTransformProvider or testDiscoverTestProvider) and any provider's initialization fails, or any code in the try block (including the duplicate-identifier throw) throws.

Common situations: A custom SchemaTransformProvider whose constructor/schema methods throw; missing dependencies for an IO provider so its class fails to initialize; misconfigured META-INF/services entries.

Related errors


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

Appendix: source

Thrown at sdks/java/managed/src/main/java/org/apache/beam/sdk/managed/ManagedSchemaTransformProvider.java:272

        if (schemaTransformProvidersCache.containsKey(schemaTransformProvider.identifier())) {
          throw new IllegalArgumentException(
              "Found multiple SchemaTransformProvider implementations with the same identifier "
                  + schemaTransformProvider.identifier());
        }
        if (supportedIdentifiers == null
            || supportedIdentifiers.contains(schemaTransformProvider.identifier())) {
          if (schemaTransformProvider.identifier().equals("beam:transform:managed:v1")) {
            // Prevent recursively adding the 'ManagedSchemaTransformProvider'.
            continue;
          }
          schemaTransformProvidersCache.put(
              schemaTransformProvider.identifier(), schemaTransformProvider);
        }
      }
      this.providersCached = true;
      return schemaTransformProvidersCache;
    } catch (Exception e) {
      throw new RuntimeException(e.getMessage());
    }
  }
}

View on GitHub (pinned to 12126d8942)