{"record":{"id":"54ef88d77a26d5ce","repo":"apache/beam","slug":"pipelineoptions-unsupported-in-s","errorCode":null,"errorMessage":"PipelineOptions unsupported in %s","messagePattern":"PipelineOptions 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":432,"sourceCode":"      throw new UnsupportedOperationException(\n          String.format(\"BoundedWindow unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public PaneInfo paneInfo(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"PaneInfo unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public PipelineOptions pipelineOptions() {\n      throw new UnsupportedOperationException(\n          String.format(\"PipelineOptions unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public DoFn<InputT, OutputT>.StartBundleContext startBundleContext(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"StartBundleContext unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public DoFn<InputT, OutputT>.FinishBundleContext finishBundleContext(\n        DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"FinishBundleContext unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public DoFn<InputT, OutputT>.OnTimerContext onTimerContext(DoFn<InputT, OutputT> doFn) {\n      throw new UnsupportedOperationException(\n          String.format(\"OnTimerContext unsupported in %s\", getErrorContext()));\n    }\n\n    @Override\n    public DoFn<InputT, OutputT>.OnWindowExpirationContext onWindowExpirationContext(","sourceCodeStart":414,"sourceCodeEnd":450,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnInvoker.java#L414-L450","documentation":"pipelineOptions() throws UnsupportedOperationException because this invoker implementation has no PipelineOptions provider bound. PipelineOptions access lets DoFns read runtime configuration; the base invoker cannot supply it. The message's error context identifies the invoker.","triggerScenarios":"Calling invoker.pipelineOptions(doFn) on a DelegatingDoFnInvoker built without a pipelineOptionsFactory; DoFn code calling context.getPipelineOptions() through an invoker lacking options binding.","commonSituations":"Custom invocation utilities (testing, wrappers) that don't pass PipelineOptions; DoFn unit tests using hand-built invokers; context objects created outside a real pipeline run.","solutions":["Bind a PipelineOptions factory when constructing the invoker (or pass PipelineOptions.as(DoFnInvoker factory))","Run the DoFn through the runner/DoFnTester, which supplies real PipelineOptions","Pass required options explicitly instead of reading them from the context in test code","Construct a TestPipelineOptions in tests rather than relying on the invoker"],"exampleFix":"// before\nMyOpts opts = context.getPipelineOptions().as(MyOpts.class); // throws in custom invoker\n// after\nDoFnInvoker invoker = DoFnInvokers.newInvoker(doFn,\n    DoFnInvoker.PipelineOptionsProvider.boundTo(PipelineOptionsFactory.create()));","handlingStrategy":"try-catch","validationCode":"boolean hasOptions = invokerProvider != null; // confirm PipelineOptionsProvider bound","typeGuard":"null","tryCatchPattern":"try { opts = invoker.pipelineOptions(doFn).as(MyOpts.class); } catch (UnsupportedOperationException e) { opts = PipelineOptionsFactory.create().as(MyOpts.class); }","preventionTips":["Bind PipelineOptionsProvider when building invokers","Use TestPipeline / PipelineOptionsFactory in tests","Pass configuration explicitly rather than via context where possible"],"tags":["apache-beam","java","unsupported-operation","pipeline-options"],"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"}