{"record":{"id":"22b3dc587e4f6489","repo":"pentaho/pentaho-kettle","slug":"xslt-exception-parameterfieldmissing-localized-message-with","errorCode":null,"errorMessage":"Xslt.Exception.ParameterFieldMissing (localized message with param name and index)","messagePattern":"Xslt\\.Exception\\.ParameterFieldMissing \\(localized message with param name and index\\)","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/job/entries/xslt/JobEntryXSLT.java","lineNumber":345,"sourceCode":"    int nrOutputProps = getOutputPropertyName() == null ? 0 : getOutputPropertyName().length;\n    if ( nrOutputProps > 0 ) {\n      outputProperties = new Properties();\n      for ( int i = 0; i < nrOutputProps; i++ ) {\n        outputProperties.put( getOutputPropertyName()[i], environmentSubstitute( getOutputPropertyValue()[i] ) );\n      }\n      setOutputProperties = true;\n    }\n\n    // Check parameters\n    nrParams = getParameterField() == null ? 0 : getParameterField().length;\n    if ( nrParams > 0 ) {\n      nameOfParams = new String[nrParams];\n      valueOfParams = new String[nrParams];\n      for ( int i = 0; i < nrParams; i++ ) {\n        String name = environmentSubstitute( getParameterName()[i] );\n        String value = environmentSubstitute( getParameterField()[i] );\n        if ( Utils.isEmpty( value ) ) {\n          throw new KettleStepException( BaseMessages.getString( PKG, \"Xslt.Exception.ParameterFieldMissing\", name, i ) );\n        }\n        nameOfParams[i] = name;\n        valueOfParams[i] = value;\n      }\n      useParameters = true;\n    }\n\n    List<RowMetaAndData> rows = result.getRows();\n    if ( isFilenamesFromPrevious() ) {\n      if ( log.isDetailed() ) {\n        logDetailed( BaseMessages.getString( PKG, \"JobEntryXSLT.Log.ArgFromPrevious.Found\", ( rows != null ? rows\n            .size() : 0 )\n            + \"\" ) );\n      }\n    }\n\n    if ( isFilenamesFromPrevious() && rows != null ) {\n      // Copy the input row to the (command line) arguments","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/job/entries/xslt/JobEntryXSLT.java#L327-L363","documentation":"During execute(), if XSLT parameters are configured but the field supplying a parameter's value is empty or missing, the step throws KettleStepException with the localized message Xslt.Exception.ParameterFieldMissing, parameterized with the parameter name and its index. XSLT transformation cannot proceed without all declared parameter values.","triggerScenarios":"nrParams > 0 and environmentSubstitute(getParameterField()[i]) returns empty for some parameter i in the loop.","commonSituations":"Upstream step renamed or dropped the field feeding the parameter; variable used in the field name is undefined; copy of job edited so parameter field was cleared.","solutions":["Restore the missing/renamed field in the upstream step","Fix or define the variable used in the parameter field expression","Remove the unused parameter from the XSLT entry configuration","Add a 'Field exists' / value check before the entry"],"exampleFix":"// before: parameter field cleared after upstream rename\nparameterField[0] = \"oldFieldName\";\n// after: point at the renamed field\nparameterField[0] = \"newFieldName\";","handlingStrategy":"validation","validationCode":"for ( int i = 0; i < entry.getParameterField().length; i++ ) {\n  String field = entry.getParameterField()[i];\n  if ( field == null || field.trim().isEmpty() || !inputRowMeta.indexOfValue( field ).isEmpty() ) {\n    // ok\n  } else {\n    throw new IllegalStateException( \"Parameter field missing: \" + field );\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  entry.execute( result, 0 );\n} catch ( KettleStepException e ) {\n  logError( \"XSLT parameter configuration error: \" + e.getMessage(), e );\n  result.setResult( false );\n}","preventionTips":["Confirm parameter field names against the upstream row layout","Resolve all variables used in field expressions before execution","Remove unused parameters from the entry","Add upstream field-existence checks"],"tags":["xslt","parameters","missing-field","transformation"],"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"}