pentaho/pentaho-kettle · error · RhinoRuntimeError

The function call getOutputRowMeta doesn't require…

Error message

The function call getOutputRowMeta doesn't require arguments.

What it means

Arity guard for getOutputRowMeta in the Rhino script-values step: the function takes no arguments, so any non-empty ArgList reaches the else-branch and throws before the "_step_" binding is consulted.

Solutions

  1. Call getOutputRowMeta() with empty parentheses.
  2. Remove any arguments from the call.
  3. If you meant to pass output data, use putRow(Object[]) instead.

Example fix

// before
getOutputRowMeta(row);
// after
getOutputRowMeta();
Defensive patterns

Strategy: validation

Validate before calling

// ensure no args: define a wrapper
function outMeta() { return getOutputRowMeta(); }

Try / catch

try { var m = getOutputRowMeta(); } catch (e) { logError(e.message); }

Prevention

When it happens

Trigger: Calling getOutputRowMeta(something) — any argument, including null or a mistakenly copied argument from another call.

Common situations: Confusing getOutputRowMeta with putRow (which takes a row); passing a row array out of habit; copy-paste from createRowCopy usage.

Understand the failure class

Background: "must be a positive integer", "cannot be empty", "invalid argument": how invalid-argument errors work across open-source libraries — this error's family across 33 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/ccae58be7314e579. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/scriptvalues_mod/ScriptValuesAddedFunctions.java:1962

  // Return the output row metadata
  public static RowMetaInterface getOutputRowMeta( Context actualContext, Scriptable actualObject,
    Object[] ArgList, Function FunctionContext ) {
    if ( ArgList.length == 0 ) {
      try {
        Object scmO = actualObject.get( "_step_", actualObject );
        try {
          ScriptValuesMod scm = (ScriptValuesMod) Context.jsToJava( scmO, ScriptValuesMod.class );
          return scm.getOutputRowMeta();
        } catch ( Exception e ) {
          ScriptValuesModDummy scm = (ScriptValuesModDummy) Context.jsToJava( scmO, ScriptValuesModDummy.class );
          return scm.getOutputRowMeta();
        }
      } catch ( Exception e ) {
        throw Context.reportRuntimeError( "Unable to get the output row metadata because of an error: "
          + Const.CR + e.toString() );
      }
    } else {
      throw Context.reportRuntimeError( "The function call getOutputRowMeta doesn't require arguments." );
    }
  }

  // Return the input row metadata
  public static RowMetaInterface getInputRowMeta( Context actualContext, Scriptable actualObject,
    Object[] ArgList, Function FunctionContext ) {
    if ( ArgList.length == 0 ) {
      try {
        Object scmO = actualObject.get( "_step_", actualObject );
        try {
          ScriptValuesMod scm = (ScriptValuesMod) Context.jsToJava( scmO, ScriptValuesMod.class );
          return scm.getInputRowMeta();
        } catch ( Exception e ) {
          ScriptValuesModDummy scm = (ScriptValuesModDummy) Context.jsToJava( scmO, ScriptValuesModDummy.class );
          return scm.getInputRowMeta();
        }
      } catch ( Exception e ) {
        throw Context.reportRuntimeError( "Unable to get the input row metadata because of an error: "

View on GitHub (pinned to f3058517a1)