apache/beam · error · UnsupportedOperationException
MultiOutputReceiver unsupported in
Error message
MultiOutputReceiver unsupported in %s
What it means
taggedOutputReceiver() throws UnsupportedOperationException because the invoker implementation has no MultiOutputReceiver bound. Multi-output (tagged) DoFns need this to write to named output tags. The error context names the unsupported invoker.
Solutions
- Provide a multiOutputReceiver factory (e.g. DoFnInvoker.MultiOutputProvider) when building the invoker
- Use the runner's ProcessContext, which implements tagged outputs, rather than the base invoker
- In tests use DoFnTester.takeOutputTag or wire tagged receivers
- If only main output is needed, switch the code path to outputReceiver
Example fix
// before
DoFnInvoker invoker = DoFnInvokers.newInvoker(doFn);
invoker.taggedOutputReceiver(doFn).get(tag).output(v); // throws
// after
DoFnInvoker invoker = DoFnInvokers.newInvoker(doFn,
DoFnInvoker.MultiOutputProvider.boundToMap(tagMap)); Defensive patterns
Strategy: type-guard
Validate before calling
boolean multi = !doFnTagMap.isEmpty(); // only need tagged receiver for multi-output DoFns
Type guard
null
Try / catch
try { invoker.taggedOutputReceiver(doFn).get(tag).output(v); } catch (UnsupportedOperationException e) { /* route to fallback receiver */ } Prevention
- Bind MultiOutputReceiver provider for multi-output DoFns
- Use runner ProcessContext for tagged outputs
- Test multi-output DoFns with DoFnTester.takeOutputTag
When it happens
Trigger: DoFn.ProcessElement code calling c.output(tag, value) when the invoker's taggedOutputReceiver has no factory; direct invocation of taggedOutputReceiver(DoFn) on a DelegatingDoFnInvoker.
Common situations: Running a multi-output DoFn through a minimal invoker or test harness that only supports single output; custom batch/windowing utilities invoking the DoFn directly.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- BoundedWindow unsupported in
- Cannot access fire timestamp outside of @OnTimer method.
- Cannot access OnTimerContext outside of @OnTimer methods.
- Cannot access OnWindowExpirationContext outside of…
- Cannot access time domain outside of @ProcessTimer method.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/1131436bbe97a353.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnInvoker.java:408
throw new UnsupportedOperationException(
String.format("OutputReceiver unsupported in %s", getErrorContext()));
}
@Override
public OutputReceiver<Row> outputRowReceiver(DoFn<InputT, OutputT> doFn) {
throw new UnsupportedOperationException(
String.format("Row OutputReceiver unsupported in %s", getErrorContext()));
}
@Override
public MultiOutputReceiver taggedOutputReceiver(DoFn<InputT, OutputT> doFn) {
throw new UnsupportedOperationException(
String.format("MultiOutputReceiver unsupported in %s", getErrorContext()));
}
@Override
public Object restriction() {
throw new UnsupportedOperationException(
String.format("Restriction unsupported in %s", getErrorContext()));
}
@Override
public BoundedWindow window() {
throw new UnsupportedOperationException(
String.format("BoundedWindow unsupported in %s", getErrorContext()));
}
@Override
public PaneInfo paneInfo(DoFn<InputT, OutputT> doFn) {
throw new UnsupportedOperationException(
String.format("PaneInfo unsupported in %s", getErrorContext()));
}
@Override
public PipelineOptions pipelineOptions() {
throw new UnsupportedOperationException(View on GitHub (pinned to 12126d8942)