{"record":{"id":"c3035465ea1add49","repo":"apache/beam","slug":"timedomain-unsupported-in-s","errorCode":null,"errorMessage":"TimeDomain unsupported in %s","messagePattern":"TimeDomain 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":390,"sourceCode":"      throw new UnsupportedOperationException(\n          String.format(\"ValueKind unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public String timerId(DoFn<InputT, OutputT> doFn) {\n      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(","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnInvoker.java#L372-L408","documentation":"The invoker base implementation throws UnsupportedOperationException from timeDomain() when no TimeDomain provider is bound. This accessor is meant to be available inside @OnTimer callbacks to learn whether the timer fired on event time or processing time. The message names the invoker's error context so developers can tell which invoker lacks support.","triggerScenarios":"Calling doFnInvocator.timeDomain(doFn) (or context code resolving time domain) on an invoker created without a timeDomainFactory, e.g. DelegatingDoFnInvoker or a minimal generated invoker.","commonSituations":"Unit-testing a DoFn with a hand-rolled invoker that stubs unsupported accessors; executing on a runner that does not expose time domain; accessing timeDomain outside a timer callback.","solutions":["Run the DoFn via a runner/invoke path that supplies TimeDomain (real pipeline execution or updated DoFnTester)","Provide a timeDomainFactory when constructing the invoker via DoFnInvokers","Guard timeDomain() access behind an OnTimerContext check","Upgrade Beam/runner version if the runner added time-domain support"],"exampleFix":"// before\nTimeDomain td = invoker.timeDomain(doFn);\n// after\nif (context instanceof DoFn.OnTimerContext) {\n  TimeDomain td = ((DoFn.OnTimerContext) context).getTimeDomain();\n}","handlingStrategy":"type-guard","validationCode":"boolean supported = context instanceof DoFn.OnTimerContext;","typeGuard":"if (!(context instanceof DoFn.OnTimerContext)) return null; TimeDomain td = ((DoFn.OnTimerContext) context).getTimeDomain();","tryCatchPattern":"try { td = invoker.timeDomain(doFn); } catch (UnsupportedOperationException e) { td = null; }","preventionTips":["Read TimeDomain via OnTimerContext method parameters where possible","Verify runner time-domain support before relying on it","Bind timeDomainFactory in custom invoker setups"],"tags":["apache-beam","java","unsupported-operation","timers"],"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"}