pentaho/pentaho-kettle · error · KettleStepException

Xslt.Exception.ErrorXSLFileFieldMissing

Error message

Xslt.Exception.ErrorXSLFileFieldMissing

What it means

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.

Solutions

  1. Open the XSLT step dialog and set 'XSL fieldname' to the incoming field containing the stylesheet path.
  2. Alternatively switch 'XSL source' back to filename and provide the XSL file directly.
  3. Verify upstream steps actually output that field.

Example fix

// before
XSL source: field, XSL fieldname: (empty)
// after
XSL source: field, XSL fieldname: xsl_path
Defensive patterns

Strategy: validation

Validate before calling

if (meta.useXSLField() && (meta.getXSLFileField() == null || meta.getXSLFileField().isEmpty())) { throw new IllegalArgumentException("XSL field mode requires a non-empty XSL fieldname"); }

Try / catch

try { step.startThreads(); } catch (KettleStepException e) { if (e.getMessage().contains("ErrorXSLFileFieldMissing")) { /* set XSL fieldname or switch to filename mode */ } }

Prevention

When it happens

Trigger: meta.useXSLField() is true and Utils.isEmpty(meta.getXSLFileField()) — the 'XSL fieldname' box is blank while 'XSL is defined in a field' is selected.

Common situations: User switched 'XSL source' to field-based but forgot to fill the field name; transformation imported with the xslfilefield attribute missing.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/395259369a78da3e. Report an issue: GitHub.

Appendix: source

Thrown at plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java:109

      }

      // Try to get XML Field index
      data.fieldposition = getInputRowMeta().indexOfValue( meta.getFieldname() );
      // Let's check the Field
      if ( data.fieldposition < 0 ) {
        // The field is unreachable !
        logError( BaseMessages.getString( PKG, "Xslt.Log.ErrorFindingField" ) + "[" + meta.getFieldname() + "]" );
        throw new KettleStepException( BaseMessages.getString( PKG, "Xslt.Exception.CouldnotFindField", meta
            .getFieldname() ) );
      }

      // Check if the XSL Filename is contained in a column
      if ( meta.useXSLField() ) {
        if ( Utils.isEmpty( meta.getXSLFileField() ) ) {
          // The field is missing
          // Result field is missing !
          logError( BaseMessages.getString( PKG, "Xslt.Log.ErrorXSLFileFieldMissing" ) );
          throw new KettleStepException( BaseMessages.getString( PKG, "Xslt.Exception.ErrorXSLFileFieldMissing" ) );
        }

        // Try to get Field index
        data.fielxslfiledposition = getInputRowMeta().indexOfValue( meta.getXSLFileField() );

        // Let's check the Field
        if ( data.fielxslfiledposition < 0 ) {
          // The field is unreachable !
          logError( BaseMessages.getString( PKG, "Xslt.Log.ErrorXSLFileFieldFinding" ) + "[" + meta.getXSLFileField()
              + "]" );
          throw new KettleStepException( BaseMessages.getString( PKG, "Xslt.Exception.ErrorXSLFileFieldFinding", meta
              .getXSLFileField() ) );
        }

      } else {
        if ( Utils.isEmpty( meta.getXslFilename() ) ) {
          logError( BaseMessages.getString( PKG, "Xslt.Log.ErrorXSLFile" ) );
          throw new KettleStepException( BaseMessages.getString( PKG, "Xslt.Exception.ErrorXSLFile" ) );

View on GitHub (pinned to f3058517a1)