pentaho/pentaho-kettle · error · KettleStepException
XsdValidator.Exception.ErrorXSDFileMissing
Error message
XsdValidator.Exception.ErrorXSDFileMissing
What it means
KettleStepException thrown by the XsdValidator step at transform start when the XSD source is 'Specify Filename' but no XSD filename was configured in the step metadata. The step cannot validate XML without a schema, so it fails fast in processRow.
Solutions
- Open the XsdValidator step dialog and set the XSD filename in the 'Specify filename' source mode
- Or switch 'XSD source' to another mode (field or no need for schema)
- Verify the saved ktr XML contains the xsd filename attribute for the step
- Null-check meta.getXSDFilename() before executing the transformation programmatically
Example fix
// before
meta.setXSDSource(meta.SPECIFY_FILENAME);
// after
meta.setXSDSource(meta.SPECIFY_FILENAME);
if (meta.getXSDFilename() == null) { meta.setXSDFilename("/schemas/order.xsd"); } Defensive patterns
Strategy: validation
Validate before calling
if (meta.getXSDSource().equals(meta.SPECIFY_FILENAME) && meta.getXSDFilename() == null) { throw new IllegalArgumentException("XSD filename must be set when XSD source = filename"); } Try / catch
try { trans.execute(...); } catch (KettleException e) { if (e.getMessage().contains("ErrorXSDFileMissing")) { /* fix step config */ } else { throw e; } } Prevention
- Always fill the XSD filename when choosing 'Specify filename' mode
- Validate step metadata in CI by loading the ktr and asserting required fields
- Use transformation metadata templates that include schema paths
When it happens
Trigger: Step meta has XSDSource == SPECIFY_FILENAME while getXSDFilename() returns null (field left blank or not saved in the transformation XML/repository).
Common situations: Cloning/shared step where the filename field was never filled; transformation edited by hand or by a metadata generator that omitted the attribute; upgrade/import losing step settings.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- XsdValidator.Exception.XmlStreamFieldMissing
- XsdValidator.Exception.XSDFieldMissing
- BlockUntilStepsFinish.Error.NotSteps
- MappingDialog.Exception.NoMappingSpecified
- MySQLBulkLoaderMeta.Exception.ConnectionNotDefined
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/497cc27c96eea29e.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xsdvalidator/XsdValidator.java:110
// The field is unreachable !
logError( BaseMessages.getString( PKG, "XsdValidator.Log.ErrorFindingField" ) + "[" + meta.getXMLStream()
+ "]" );
throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.CouldnotFindField", meta
.getXMLStream() ) );
}
// Let's check that Result Field is given
if ( meta.getResultfieldname() == null ) {
// Result field is missing !
logError( BaseMessages.getString( PKG, "XsdValidator.Log.ErrorResultFieldMissing" ) );
throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.ErrorResultFieldMissing" ) );
}
// Is XSD file is provided?
if ( meta.getXSDSource().equals( meta.SPECIFY_FILENAME ) ) {
if ( meta.getXSDFilename() == null ) {
logError( BaseMessages.getString( PKG, "XsdValidator.Log.ErrorXSDFileMissing" ) );
throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.ErrorXSDFileMissing" ) );
} else {
// Is XSD file exists ?
FileObject xsdfile = null;
try {
xsdfile = KettleVFS.getInstance( getTransMeta().getBowl() ).getFileObject( environmentSubstitute( meta.getXSDFilename() ), getTransMeta() );
if ( !xsdfile.exists() ) {
logError( BaseMessages.getString( PKG, "XsdValidator.Log.Error.XSDFileNotExists" ) );
throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.XSDFileNotExists" ) );
}
} catch ( Exception e ) {
logError( BaseMessages.getString( PKG, "XsdValidator.Log.Error.GettingXSDFile" ) );
throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.GettingXSDFile" ) );
} finally {
try {
if ( xsdfile != null ) {
xsdfile.close();
}View on GitHub (pinned to f3058517a1)