{"record":{"id":"900a21f5b53b956d","repo":"pentaho/pentaho-kettle","slug":"the-function-call-getoutputrowmeta-doesn-t-require-arguments","errorCode":null,"errorMessage":"The function call getOutputRowMeta doesn't require arguments.","messagePattern":"The function call getOutputRowMeta doesn't require arguments\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/script/ScriptAddedFunctions.java","lineNumber":1875,"sourceCode":"  // Return the output row metadata\n  public static RowMetaInterface getOutputRowMeta( ScriptEngine actualContext, Bindings actualObject,\n    Object[] ArgList, Object FunctionContext ) {\n    if ( ArgList.length == 0 ) {\n      try {\n        Object scmO = actualObject.get( \"_step_\" );\n        try {\n          Script scm = (Script) scmO;\n          return scm.getOutputRowMeta();\n        } catch ( Exception e ) {\n          ScriptDummy scm = (ScriptDummy) scmO;\n          return scm.getOutputRowMeta();\n        }\n      } catch ( Exception e ) {\n        throw new RuntimeException( \"Unable to get the output row metadata because of an error: \"\n          + Const.CR + e.toString() );\n      }\n    } else {\n      throw new RuntimeException( \"The function call getOutputRowMeta doesn't require arguments.\" );\n    }\n  }\n\n  // Return the input row metadata\n  public static RowMetaInterface getInputRowMeta( ScriptEngine actualContext, Bindings actualObject,\n    Object[] ArgList, Object FunctionContext ) {\n    if ( ArgList.length == 0 ) {\n      try {\n        Object scmO = actualObject.get( \"_step_\" );\n        try {\n          Script scm = (Script) scmO;\n          return scm.getInputRowMeta();\n        } catch ( Exception e ) {\n          ScriptDummy scm = (ScriptDummy) scmO;\n          return scm.getInputRowMeta();\n        }\n      } catch ( Exception e ) {\n        throw new RuntimeException( \"Unable to get the input row metadata because of an error: \"","sourceCodeStart":1857,"sourceCodeEnd":1893,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/script/ScriptAddedFunctions.java#L1857-L1893","documentation":"Argument-count guard in ScriptAddedFunctions.getOutputRowMeta, a JavaScript-exposed added function returning the output row metadata (RowMetaInterface) of the executing step via the _step_ binding. It fires when a script calls getOutputRowMeta with any arguments; the function takes none, so Rhino's Context.reportRuntimeError rejects the call. Fix by calling it as getOutputRowMeta() with an empty argument list.","triggerScenarios":"Thrown at engine/src/main/java/org/pentaho/di/trans/steps/script/ScriptAddedFunctions.java:1875 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call getOutputRowMeta() with an empty argument list"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}