pentaho/pentaho-kettle · error · RuntimeException

The function call getOutputRowMeta doesn't require…

Error message

The function call getOutputRowMeta doesn't require arguments.

What it means

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.

Solutions

  1. Call getOutputRowMeta() with an empty argument list
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at engine/src/main/java/org/pentaho/di/trans/steps/script/ScriptAddedFunctions.java:1875 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/script/ScriptAddedFunctions.java:1875

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

  // Return the input row metadata
  public static RowMetaInterface getInputRowMeta( ScriptEngine actualContext, Bindings actualObject,
    Object[] ArgList, Object FunctionContext ) {
    if ( ArgList.length == 0 ) {
      try {
        Object scmO = actualObject.get( "_step_" );
        try {
          Script scm = (Script) scmO;
          return scm.getInputRowMeta();
        } catch ( Exception e ) {
          ScriptDummy scm = (ScriptDummy) scmO;
          return scm.getInputRowMeta();
        }
      } catch ( Exception e ) {
        throw new RuntimeException( "Unable to get the input row metadata because of an error: "

View on GitHub (pinned to f3058517a1)