{"record":{"id":"ed3b5204ca0f9282","repo":"pentaho/pentaho-kettle","slug":"there-is-no-name-specified-for-validator-field","errorCode":null,"errorMessage":"There is no name specified for validator field #","messagePattern":"There is no name specified for validator field #","errorType":"validation","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/validator/Validator.java","lineNumber":106,"sourceCode":"      }\n\n      data.fieldIndexes = new int[ meta.getValidations().size() ];\n\n      // Calculate the indexes of the values and arguments in the target data or temporary data\n      // We do this in advance to save time later on.\n      //\n      for ( int i = 0; i < meta.getValidations().size(); i++ ) {\n        Validation field = meta.getValidations().get( i );\n\n        if ( !Utils.isEmpty( field.getFieldName() ) ) {\n          data.fieldIndexes[ i ] = getInputRowMeta().indexOfValue( field.getFieldName() );\n          if ( data.fieldIndexes[ i ] < 0 ) {\n            // Nope: throw an exception\n            throw new KettleStepException( \"Unable to find the specified fieldname '\"\n              + field.getFieldName() + \"' for validation#\" + ( i + 1 ) );\n          }\n        } else {\n          throw new KettleStepException( \"There is no name specified for validator field #\" + ( i + 1 ) );\n        }\n      }\n    } else {\n      // Read the row AFTER the info rows\n      // That way the info-rowsets are out of the way\n      //\n      r = getRow(); // get row, set busy!\n      if ( r == null ) { // no more input to be expected...\n\n        setOutputDone();\n        return false;\n      }\n    }\n\n    if ( log.isRowLevel() ) {\n      logRowlevel( \"Read row #\" + getLinesRead() + \" : \" + getInputRowMeta().getString( r ) );\n    }\n","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/validator/Validator.java#L88-L124","documentation":"Configuration validation in Validator.processRow: a validation entry in the list has no field name set (empty FieldName), so the step cannot resolve an input field index for it. The message appends the offending entry's sequence number.","triggerScenarios":"processRow loop over meta.getValidations(); Utils.isEmpty(field.getFieldName()) is true for validation i, so the step throws instead of doing an index lookup.","commonSituations":"A validation row added in the dialog but never assigned a field; settings imported/copied with blank field names; programmatic construction of Validation objects without setFieldName.","solutions":["Open the Validator step and fill in the field name for the listed validation #.","Remove the empty validation entry if it was added accidentally.","If constructing validations in code, call setFieldName() with a non-empty value before running.","Validate metadata programmatically: iterate getValidations() and reject empty fieldName entries before execution."],"exampleFix":"// before\nValidation v = new Validation();\nmeta.getValidations().add(v);\n// after\nValidation v = new Validation();\nv.setFieldName(\"email\");\nif (Utils.isEmpty(v.getFieldName())) throw new IllegalArgumentException(\"fieldName required\");\nmeta.getValidations().add(v);","handlingStrategy":"validation","validationCode":"// Before execution\nmeta.getValidations().stream()\n  .filter(v -> Utils.isEmpty(v.getFieldName()))\n  .findFirst()\n  .ifPresent(v -> { throw new IllegalStateException(\"Validator has a validation with no field name\"); });","typeGuard":null,"tryCatchPattern":"try {\n  trans.startThreads();\n} catch (KettleStepException e) {\n  if (e.getMessage().startsWith(\"There is no name specified for validator field\")) {\n    int idx = Integer.parseInt(e.getMessage().replaceAll(\".*#(\\\\d+)\", \"$1\"));\n    logError(\"Validation #\" + idx + \" missing field name\");\n  }\n}","preventionTips":["Never add empty validation rows in the dialog","Validate step metadata programmatically before running","When generating validations in code, always setFieldName first"],"tags":["kettle","validator","missing-field-name","config"],"backgroundTag":"empty-required-field","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"}