{"record":{"id":"cbea9dfb2a6be308","repo":"pentaho/pentaho-kettle","slug":"xslt-exception-errorresultfieldmissing","errorCode":null,"errorMessage":"Xslt.Exception.ErrorResultFieldMissing","messagePattern":"Xslt\\.Exception\\.ErrorResultFieldMissing","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java","lineNumber":83,"sourceCode":"    data = (XsltData) sdi;\n\n    Object[] row = getRow();\n\n    if ( row == null ) { // no more input to be expected...\n      setOutputDone();\n      return false;\n    }\n    if ( first ) {\n      first = false;\n      data.outputRowMeta = getInputRowMeta().clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n                      metaStore );\n\n      // Check if The result field is given\n      if ( Utils.isEmpty( meta.getResultfieldname() ) ) {\n        // Result Field is missing !\n        logError( BaseMessages.getString( PKG, \"Xslt.Log.ErrorResultFieldMissing\" ) );\n        throw new KettleStepException( BaseMessages.getString( PKG, \"Xslt.Exception.ErrorResultFieldMissing\" ) );\n      }\n\n      // Check if The XML field is given\n      if ( Utils.isEmpty( meta.getFieldname() ) ) {\n        // Result Field is missing !\n        logError( BaseMessages.getString( PKG, \"Xslt.Exception.ErrorXMLFieldMissing\" ) );\n        throw new KettleStepException( BaseMessages.getString( PKG, \"Xslt.Exception.ErrorXMLFieldMissing\" ) );\n      }\n\n      // Try to get XML Field index\n      data.fieldposition = getInputRowMeta().indexOfValue( meta.getFieldname() );\n      // Let's check the Field\n      if ( data.fieldposition < 0 ) {\n        // The field is unreachable !\n        logError( BaseMessages.getString( PKG, \"Xslt.Log.ErrorFindingField\" ) + \"[\" + meta.getFieldname() + \"]\" );\n        throw new KettleStepException( BaseMessages.getString( PKG, \"Xslt.Exception.CouldnotFindField\", meta\n            .getFieldname() ) );\n      }","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java#L65-L101","documentation":"The XSLT step requires a result field name configured — the field where the transformed output will be placed. At processRow startup, if meta.getResultfieldname() is empty, the step logs 'ErrorResultFieldMissing' and throws this KettleStepException, aborting the step.","triggerScenarios":"processRow begins and Utils.isEmpty(meta.getResultfieldname()) is true, i.e. the 'Result fieldname' box in the XSLT step dialog was left blank.","commonSituations":"Step added to transformation but dialog never fully configured; transformation imported from XML/repo with the result fieldname attribute stripped or missing; copying an older step definition lacking the field.","solutions":["Open the XSLT step dialog and set the 'Result fieldname' to a non-empty name.","Verify the saved step XML/repo attributes contain the resultfieldname entry.","Re-create the step if its metadata is corrupted."],"exampleFix":"// before (step dialog left blank)\nResult fieldname: (empty)\n// after\nResult fieldname: result  // receives the XSLT output string","handlingStrategy":"validation","validationCode":"if (meta.getResultfieldname() == null || meta.getResultfieldname().isEmpty()) { throw new IllegalArgumentException(\"XSLT step requires a result fieldname\"); } // before adding/executing the step","typeGuard":null,"tryCatchPattern":"try { step.startThreads(); } catch (KettleStepException e) { if (e.getMessage().contains(\"ErrorResultFieldMissing\")) { /* prompt user to set Result fieldname */ } }","preventionTips":["Always complete the XSLT step dialog before saving","Validate transformation steps at design time (Ctrl+R / check step)","Review step settings when importing transformations from XML or other repos"],"tags":["xslt","configuration","kettle","missing-field"],"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"}