{"record":{"id":"8ac25978d6bb18fb","repo":"pentaho/pentaho-kettle","slug":"xslt-exception-errorxmlfieldmissing","errorCode":null,"errorMessage":"Xslt.Exception.ErrorXMLFieldMissing","messagePattern":"Xslt\\.Exception\\.ErrorXMLFieldMissing","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java","lineNumber":90,"sourceCode":"    }\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      }\n\n      // Check if the XSL Filename is contained in a column\n      if ( meta.useXSLField() ) {\n        if ( Utils.isEmpty( meta.getXSLFileField() ) ) {\n          // The field is missing\n          // Result field is missing !\n          logError( BaseMessages.getString( PKG, \"Xslt.Log.ErrorXSLFileFieldMissing\" ) );","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java#L72-L108","documentation":"The XSLT step requires the name of the incoming field containing the XML to transform. If meta.getFieldname() is empty, processRow logs 'ErrorXMLFieldMissing' and throws this KettleStepException before processing any rows.","triggerScenarios":"processRow begins and Utils.isEmpty(meta.getFieldname()) is true — the 'XML fieldname' setting in the XSLT step dialog is blank.","commonSituations":"Step configured only partially; upstream step renamed/removed the XML source field but the XML fieldname setting itself was never set; template-based step creation skipped configuration.","solutions":["Open the XSLT step dialog and set 'XML fieldname' to the incoming field holding the XML.","Ensure the previous step outputs a field with that exact name.","Re-save the transformation so the fieldname attribute persists."],"exampleFix":"// before\nXML fieldname: (empty)\n// after\nXML fieldname: xml_content  // String field from previous step","handlingStrategy":"validation","validationCode":"if (meta.getFieldname() == null || meta.getFieldname().isEmpty()) { throw new IllegalArgumentException(\"XSLT step requires an XML fieldname\"); }","typeGuard":null,"tryCatchPattern":"try { step.startThreads(); } catch (KettleStepException e) { if (e.getMessage().contains(\"ErrorXMLFieldMissing\")) { /* fix XML fieldname in dialog */ } }","preventionTips":["Use the dialog's 'Get fields' to pick from actual upstream fields","Run step-level metadata check before executing the transformation","Re-validate steps after importing transformations"],"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"}