{"record":{"id":"fa68df5cf717c751","repo":"apache/beam","slug":"outputreceiver-unsupported-in-s","errorCode":null,"errorMessage":"OutputReceiver unsupported in %s","messagePattern":"OutputReceiver unsupported in (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnInvoker.java","lineNumber":396,"sourceCode":"      throw new UnsupportedOperationException(\n          String.format(\"TimerId unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public TimeDomain timeDomain(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"TimeDomain unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public OutputReceiver<OutputT> outputReceiver(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"OutputReceiver unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public OutputReceiver<Row> outputRowReceiver(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"Row OutputReceiver unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public MultiOutputReceiver taggedOutputReceiver(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"MultiOutputReceiver unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public Object restriction() {\n      throw new UnsupportedOperationException(\n          String.format(\"Restriction unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public BoundedWindow window() {\n      throw new UnsupportedOperationException(","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnInvoker.java#L378-L414","documentation":"outputReceiver() is unsupported in this invoker implementation: the base class throws UnsupportedOperationException because no OutputReceiver factory was supplied. The invoker cannot route the DoFn's main outputs without a receiver. The error context in the message identifies which invoker was used.","triggerScenarios":"Invoking outputReceiver(DoFn) on a DelegatingDoFnInvoker or generated invoker built without an outputReceiverFactory; DoFn code calling c.output(...) when the invoker lacks a bound receiver.","commonSituations":"Custom invocation code (e.g. testing frameworks, state/timer utilities) that invokes the DoFn directly without wiring output receivers; using DoFnInvokers.newInvoker with a restricted factory set.","solutions":["Supply an outputReceiverFactory when creating the invoker","Use the runner's normal invocation path (DoFnProcessContext) instead of invoking via the raw invoker","In tests, use DoFnTester which wires receivers, or register a test OutputReceiver","Capture main-bundle output via a ProcessContext implementation rather than the base invoker"],"exampleFix":"// before\nDoFnInvoker invoker = DoFnInvokers.newInvoker(doFn);\ninvoker.invokeProcessElement(context); // context.output() throws\n// after\nDoFnInvoker invoker = DoFnInvokers.newInvoker(doFn,\n    DoFnInvoker.OutputProvider.boundTo((OutputReceiver<Object>) receiver));","handlingStrategy":"try-catch","validationCode":"boolean hasOutput = invoker instanceof /* concrete invoker with output support */ ;","typeGuard":"null","tryCatchPattern":"try { invoker.outputReceiver(doFn).output(v); } catch (UnsupportedOperationException e) { throw new IllegalStateException(\"Invoker lacks output receiver\", e); }","preventionTips":["Always bind an OutputReceiver factory when creating invokers manually","Prefer DoFnTester or the runner path in tests","Don't call invokeProcessElement with a context lacking receivers"],"tags":["apache-beam","java","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}