{"record":{"id":"6b90fd6bf734de12","repo":"pentaho/pentaho-kettle","slug":"xslt-exception-parameterfieldmissing","errorCode":null,"errorMessage":"Xslt.Exception.ParameterFieldMissing","messagePattern":"Xslt\\.Exception\\.ParameterFieldMissing","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java","lineNumber":177,"sourceCode":"      if ( nrOutputProps > 0 ) {\n        data.outputProperties = new Properties();\n        for ( int i = 0; i < nrOutputProps; i++ ) {\n          data.outputProperties.put( meta.getOutputPropertyName()[i], environmentSubstitute( meta\n              .getOutputPropertyValue()[i] ) );\n        }\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","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java#L159-L195","documentation":"Thrown by the XSLT step in processRow when a configured XSLT parameter has no source field: meta.getParameterField()[i] is empty/null after environment substitution. Each parameter must map both a parameter name and an incoming row field whose value is passed into the transformation. The message includes the parameter name and its zero-based index.","triggerScenarios":"In the XSLT step's Parameters table, a row has a Parameter name but the Field column left blank (or resolves to empty after variable substitution).","commonSituations":"Adding a parameter name but forgetting to select the input field; a variable used in the Field column evaluates to empty; a partially configured step saved from an older transformation version.","solutions":["Open the XSLT step dialog and set the Field column for every parameter row","If using variables in the Field column, ensure they resolve to a non-empty field name at runtime","Remove parameter rows that are no longer needed instead of leaving the field blank"],"exampleFix":"// before\nParameters: [{ name: \"custId\", field: \"\" }]\n// after\nParameters: [{ name: \"custId\", field: \"customer_id\" }]","handlingStrategy":"validation","validationCode":"// Before executing, verify each parameter row has a field\nfor (int i = 0; i < parameterName.length; i++) {\n    if (parameterField[i] == null || parameterField[i].trim().isEmpty()) {\n        throw new IllegalArgumentException(\"Parameter '\" + parameterName[i] + \"' has no source field\");\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    transformation.execute(...);\n} catch (KettleStepException e) {\n    if (e.getMessage().contains(\"ParameterFieldMissing\")) {\n        // fix step parameter mapping and retry\n    }\n}","preventionTips":["Fill both name and field columns for every XSLT parameter row","Avoid variables in the Field column, or verify their resolution per environment","Preview rows before running to confirm required fields exist"],"tags":["xslt","kettle","parameter","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"}