pentaho/pentaho-kettle · error · KettleStepException

RegexEval.Log.ErrorInStep

Error message

RegexEval.Log.ErrorInStep

What it means

RegexEval.processRow caught an exception while applying the regular expression to a row. When the step metadata does NOT enable error handling, it wraps the cause in a KettleStepException with message 'RegexEval.Log.ErrorInStep' and aborts the transformation. With error handling enabled the row is instead routed to the error row stream.

Solutions

  1. Validate the regex in the step dialog before running (it compiles on preview).
  2. Enable error handling on the step so bad rows go to an error stream instead of failing the transformation.
  3. Check upstream steps ensure the evaluated field is a non-null String.
  4. Fix the regex pattern that threw the underlying exception (see the chained cause).

Example fix

// before: step fails on bad rows
// no error handling configured
// after: configure error handling so failures are routed, not thrown
stepMeta.setSupportsErrorHandling( true ); // or set via the 'Error handling' dialog
Defensive patterns

Strategy: try-catch

When it happens

Trigger: A malformed or non-matching regex evaluation throws during processRow (e.g. PatternSyntaxException from an invalid script regex, or NullPointerException on fields) while step error handling is disabled.

Common situations: Typing an invalid regex in the RegexEval step dialog; input field unexpectedly null; running transformations copied from examples where 'Error handling' was never configured.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/regexeval/RegexEval.java:214

      }

      if ( log.isRowLevel() ) {
        logRowlevel( BaseMessages.getString( PKG, "RegexEval.Log.ReadRow" )
          + " " + getInputRowMeta().getString( row ) );
      }

      // copy row to output rowset(s);
      //
      putRow( data.outputRowMeta, outputRow );
    } catch ( KettleException e ) {
      boolean sendToErrorRow = false;
      String errorMessage = null;

      if ( getStepMeta().isDoingErrorHandling() ) {
        sendToErrorRow = true;
        errorMessage = e.toString();
      } else {
        throw new KettleStepException( BaseMessages.getString( PKG, "RegexEval.Log.ErrorInStep" ), e );
      }

      if ( sendToErrorRow ) {
        // Simply add this row to the error row
        putError( getInputRowMeta(), outputRow, 1, errorMessage, null, "REGEX001" );
      }
    }
    return true;
  }

  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
    meta = (RegexEvalMeta) smi;
    data = (RegexEvalData) sdi;

    if ( super.init( smi, sdi ) ) {
      // Embedded options
      String options = meta.getRegexOptions();

View on GitHub (pinned to f3058517a1)