{"record":{"id":"14880bbe96426d63","repo":"pentaho/pentaho-kettle","slug":"xslt-exception-parameterfieldnotfound","errorCode":null,"errorMessage":"Xslt.Exception.ParameterFieldNotFound","messagePattern":"Xslt\\.Exception\\.ParameterFieldNotFound","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java","lineNumber":182,"sourceCode":"        }\n        data.setOutputProperties = true;\n      }\n\n      // Check parameters\n      data.nrParams = meta.getParameterField() == null ? 0 : meta.getParameterField().length;\n      if ( data.nrParams > 0 ) {\n        data.indexOfParams = new int[data.nrParams];\n        data.nameOfParams = new String[data.nrParams];\n        for ( int i = 0; i < data.nrParams; i++ ) {\n          String name = environmentSubstitute( meta.getParameterName()[i] );\n          String field = environmentSubstitute( meta.getParameterField()[i] );\n          if ( Utils.isEmpty( field ) ) {\n            throw new KettleStepException( BaseMessages\n                .getString( PKG, \"Xslt.Exception.ParameterFieldMissing\", name, i ) );\n          }\n          data.indexOfParams[i] = getInputRowMeta().indexOfValue( field );\n          if ( data.indexOfParams[i] < 0 ) {\n            throw new KettleStepException( BaseMessages.getString( PKG, \"Xslt.Exception.ParameterFieldNotFound\", name ) );\n          }\n          data.nameOfParams[i] = name;\n        }\n        data.useParameters = true;\n      }\n\n      data.factory = TransformerFactory.newInstance();\n\n      if ( meta.getXSLFactory().equals( \"SAXON\" ) ) {\n        // Set the TransformerFactory to the SAXON implementation.\n        data.factory = new net.sf.saxon.TransformerFactoryImpl();\n      }\n    } // end if first\n\n    // Get the field value\n    String xmlValue = getInputRowMeta().getString( row, data.fieldposition );\n\n    if ( meta.useXSLField() ) {","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java#L164-L200","documentation":"Thrown by the XSLT step in processRow when a configured parameter's Field value does not match any field in the incoming row stream: getInputRowMeta().indexOfValue(field) returns -1. The parameter name is included in the message. This is a row-metadata mismatch, not a config-parse failure.","triggerScenarios":"The Field column names a field absent from the row entering the XSLT step, typically because an upstream step was renamed, removed, or the field name has different casing/whitespace.","commonSituations":"Renaming an upstream field without updating the XSLT parameter mapping; reusing a transformation where the input layout changed; trailing spaces in the field name.","solutions":["Update the parameter's Field value in the XSLT step to a field present in the incoming stream","Inspect the row layout with 'Preview' or a Dummy step to confirm actual field names","Restore the upstream field (rename it back or re-add a Select values/Calculator step) if it should exist"],"exampleFix":"// before\nfield: \"custumer_id\"   // typo, not in stream\n// after\nfield: \"customer_id\"","handlingStrategy":"validation","validationCode":"// Verify mapped fields exist in the input stream metadata before the step\nString[] mapped = { \"customer_id\" }; // fields used by XSLT parameters\nfor (String f : mapped) {\n    if (inputRowMeta.indexOfValue(f) < 0) {\n        throw new IllegalArgumentException(\"Field missing from stream: \" + f);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    transformation.execute(...);\n} catch (KettleStepException e) {\n    if (e.getMessage().contains(\"ParameterFieldNotFound\")) {\n        // realign upstream field names with parameter mappings\n    }\n}","preventionTips":["Lock upstream field names before wiring downstream parameter mappings","Use a 'Select values' step to rename fields explicitly and consistently","Re-preview transformations after any upstream schema change"],"tags":["xslt","kettle","parameter","field-not-found","row-metadata"],"backgroundTag":"record-not-found","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"}