pentaho/pentaho-kettle · error · RhinoRuntimeError

The function call getInputRowMeta doesn't require arguments.

Error message

The function call getInputRowMeta doesn't require arguments.

What it means

Arity guard for getInputRowMeta in the Rhino script-values step: the function takes no arguments. A non-empty argument list reaches the else-branch and throws; the row metadata itself is fetched from the bound ScriptValuesMod/ScriptValuesModDummy step.

Solutions

  1. Call getInputRowMeta() with no arguments.
  2. If you intended to resize/copy a row, use createRowCopy(newSize) instead.
  3. Search the script for stray arguments on metadata accessor calls.

Example fix

// before
getInputRowMeta(3);
// after
var meta = getInputRowMeta();
var newRow = createRowCopy(3);
Defensive patterns

Strategy: validation

Try / catch

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

Prevention

When it happens

Trigger: getInputRowMeta(row) or getInputRowMeta('x') — any non-empty argument list.

Common situations: Confusing with createRowCopy (which takes the new size); leaving an argument after refactoring; autocomplete inserting a placeholder.

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/4959b855b332f537. Report an issue: GitHub.

Appendix: source

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

  // 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: "
          + Const.CR + e.toString() );
      }
    } else {
      throw Context.reportRuntimeError( "The function call getInputRowMeta doesn't require arguments." );
    }
  }

  // Return the input row metadata
  public static Object[] createRowCopy( Context actualContext, Scriptable actualObject, Object[] ArgList,
    Function FunctionContext ) {
    if ( ArgList.length == 1 ) {
      try {
        int newSize = (int) Math.round( Context.toNumber( ArgList[0] ) );

        Object scmO = actualObject.get( "row", actualObject );
        Object[] row = (Object[]) Context.jsToJava( scmO, ( new Object[] {} ).getClass() );

        return RowDataUtil.createResizedCopy( row, newSize );
      } catch ( Exception e ) {
        throw Context.reportRuntimeError( "Unable to create a row copy: " + Const.CR + e.toString() );
      }
    } else {

View on GitHub (pinned to f3058517a1)