{"record":{"id":"6c62380f0d1fe136","repo":"pentaho/pentaho-kettle","slug":"regexeval-exception-errormatchermissing","errorCode":null,"errorMessage":"RegexEval.Exception.ErrorMatcherMissing","messagePattern":"RegexEval\\.Exception\\.ErrorMatcherMissing","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/regexeval/RegexEval.java","lineNumber":100,"sourceCode":"          throw new KettleStepException( BaseMessages.getString(\n            PKG, \"RegexEval.Exception.ErrorResultFieldMissing\" ) );\n        }\n        data.indexOfResultField = -1;\n      } else {\n        if ( meta.isReplacefields() ) {\n          data.indexOfResultField = getInputRowMeta().indexOfValue( meta.getResultFieldName() );\n        }\n        if ( data.indexOfResultField < 0 ) {\n          data.indexOfResultField = getInputRowMeta().size();\n          captureIndex++;\n        }\n      }\n\n      // Check if a Field (matcher) is given\n      if ( meta.getMatcher() == null ) {\n        // Matcher is missing !\n        logError( BaseMessages.getString( PKG, \"RegexEval.Log.ErrorMatcherMissing\" ) );\n        throw new KettleStepException( BaseMessages.getString( PKG, \"RegexEval.Exception.ErrorMatcherMissing\" ) );\n      }\n\n      // Cache the position of the Field\n      data.indexOfFieldToEvaluate = getInputRowMeta().indexOfValue( meta.getMatcher() );\n      if ( data.indexOfFieldToEvaluate < 0 ) {\n        // The field is unreachable !\n        logError( BaseMessages.getString( PKG, \"RegexEval.Log.ErrorFindingField\" ) + \"[\" + meta.getMatcher() + \"]\" );\n        throw new KettleStepException( BaseMessages.getString( PKG, \"RegexEval.Exception.CouldnotFindField\", meta\n          .getMatcher() ) );\n      }\n\n      // Cache the position of the CaptureGroups\n      if ( meta.isAllowCaptureGroupsFlagSet() ) {\n        data.positions = new int[meta.getFieldName().length];\n        String[] fieldName = meta.getFieldName();\n        for ( int i = 0; i < fieldName.length; i++ ) {\n          if ( fieldName[i] == null || fieldName[i].length() == 0 ) {\n            continue;","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/regexeval/RegexEval.java#L82-L118","documentation":"RegexEval.processRow throws KettleStepException when no matcher field is configured (meta.getMatcher() == null). The step must know which incoming field's value the regular expression is evaluated against; without it, evaluation cannot proceed.","triggerScenarios":"Executing a Regex Eval step where the 'The field to evaluate' (matcher) dropdown was never set — detected on the first row processed.","commonSituations":"Building the step programmatically without calling setMatcher(); a transformation whose upstream field was renamed leaving the matcher unset; hand-edited XML dropping the matcher attribute.","solutions":["Open the Regex Eval dialog and select a field in 'The field to evaluate'","Or call setMatcher(\"fieldName\") on the meta before executing","Verify the step XML contains the matcher attribute if editing files directly"],"exampleFix":"// before\nRegexEvalMeta meta = new RegexEvalMeta();\nmeta.setRegex(\"^A.*$\");\n// after\nRegexEvalMeta meta = new RegexEvalMeta();\nmeta.setRegex(\"^A.*$\");\nif (meta.getMatcher() == null || meta.getMatcher().isEmpty()) {\n  meta.setMatcher(\"inputField\");\n}","handlingStrategy":"validation","validationCode":"RegexEvalMeta m = (RegexEvalMeta) stepMeta.getStepMetaInterface();\nif (m.getMatcher() == null || m.getMatcher().trim().isEmpty()) throw new IllegalArgumentException(\"Matcher field must be set on Regex Eval step\");","typeGuard":"boolean hasMatcher(RegexEvalMeta m) { return m.getMatcher() != null && !m.getMatcher().trim().isEmpty(); }","tryCatchPattern":"try { trans.execute(...); } catch (KettleException e) { if (e.getMessage().contains(\"ErrorMatcherMissing\")) { logError(\"Configure 'The field to evaluate' in the Regex Eval step\"); } throw e; }","preventionTips":["Set the matcher field immediately when configuring the step","Re-check step configuration after upstream field renames","Validate metadata programmatically before scheduled executions"],"tags":["kettle","regex","validation","step-config"],"backgroundTag":"missing-required-argument","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"}