{"record":{"id":"395259369a78da3e","repo":"pentaho/pentaho-kettle","slug":"xslt-exception-errorxslfilefieldmissing","errorCode":null,"errorMessage":"Xslt.Exception.ErrorXSLFileFieldMissing","messagePattern":"Xslt\\.Exception\\.ErrorXSLFileFieldMissing","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java","lineNumber":109,"sourceCode":"      }\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\" ) );\n          throw new KettleStepException( BaseMessages.getString( PKG, \"Xslt.Exception.ErrorXSLFileFieldMissing\" ) );\n        }\n\n        // Try to get Field index\n        data.fielxslfiledposition = getInputRowMeta().indexOfValue( meta.getXSLFileField() );\n\n        // Let's check the Field\n        if ( data.fielxslfiledposition < 0 ) {\n          // The field is unreachable !\n          logError( BaseMessages.getString( PKG, \"Xslt.Log.ErrorXSLFileFieldFinding\" ) + \"[\" + meta.getXSLFileField()\n              + \"]\" );\n          throw new KettleStepException( BaseMessages.getString( PKG, \"Xslt.Exception.ErrorXSLFileFieldFinding\", meta\n              .getXSLFileField() ) );\n        }\n\n      } else {\n        if ( Utils.isEmpty( meta.getXslFilename() ) ) {\n          logError( BaseMessages.getString( PKG, \"Xslt.Log.ErrorXSLFile\" ) );\n          throw new KettleStepException( BaseMessages.getString( PKG, \"Xslt.Exception.ErrorXSLFile\" ) );","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java#L91-L127","documentation":"The step is configured to read the XSL stylesheet filename from an incoming field ('XSL source' = field), but the name of that field is empty. processRow logs 'ErrorXSLFileFieldMissing' and throws this KettleStepException.","triggerScenarios":"meta.useXSLField() is true and Utils.isEmpty(meta.getXSLFileField()) — the 'XSL fieldname' box is blank while 'XSL is defined in a field' is selected.","commonSituations":"User switched 'XSL source' to field-based but forgot to fill the field name; transformation imported with the xslfilefield attribute missing.","solutions":["Open the XSLT step dialog and set 'XSL fieldname' to the incoming field containing the stylesheet path.","Alternatively switch 'XSL source' back to filename and provide the XSL file directly.","Verify upstream steps actually output that field."],"exampleFix":"// before\nXSL source: field, XSL fieldname: (empty)\n// after\nXSL source: field, XSL fieldname: xsl_path","handlingStrategy":"validation","validationCode":"if (meta.useXSLField() && (meta.getXSLFileField() == null || meta.getXSLFileField().isEmpty())) { throw new IllegalArgumentException(\"XSL field mode requires a non-empty XSL fieldname\"); }","typeGuard":null,"tryCatchPattern":"try { step.startThreads(); } catch (KettleStepException e) { if (e.getMessage().contains(\"ErrorXSLFileFieldMissing\")) { /* set XSL fieldname or switch to filename mode */ } }","preventionTips":["When switching 'XSL source' mode, fill both mode-specific fields","Validate the step dialog before closing","Ensure the referenced field exists in the upstream row"],"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"}