pentaho/pentaho-kettle · error · KettleStepException
XsdValidator.Exception.XMLfileMissing
Error message
XsdValidator.Exception.XMLfileMissing
What it means
Validation in XsdValidator.processRow: the XSD filename setting is empty while no XSD field supplies the schema, so the validator has no schema to validate against. Fires before the SchemaFactory parses anything.
Solutions
- Check the logged filename (XMLFieldvalue) and verify it exists on the executing machine
- Generate absolute paths upstream (e.g. using ${Internal.Transformation.Filename.Directory})
- Add a 'File exists' filter step before the validator to skip/handle missing files
- Fix case sensitivity or path separators in the data
Example fix
// before
String xmlPath = "data/orders/order1.xml"; // relative, run dir differs
// after
String xmlPath = "${Internal.Transformation.Filename.Directory}/data/orders/order1.xml"; Defensive patterns
Strategy: validation
Validate before calling
FileObject f = KettleVFS.getInstance(bowl).getFileObject(xmlPath);
if (f == null || !f.exists()) { skipOrRouteToErrorRow(xmlPath); } Try / catch
try { run(); } catch (KettleStepException e) { if (e.getMessage().contains("XMLfileMissing")) { handleMissingFile(xmlPath); } else { throw e; } } Prevention
- Filter file lists for existence before validating
- Use absolute, platform-consistent paths in data
- Watch for case sensitivity when moving from Windows to Linux
When it happens
Trigger: Row value used as XML filename points to a missing/nonexistent file: KettleVFS getFileObject returns null or exists() false — bad path in the data, file deleted between listing and validating, env-specific path.
Common situations: File-listing feeds validator but files were archived/deleted; relative paths in data broken by different working directory; case-sensitive filesystems on Linux vs paths generated on Windows.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- XsdValidator.Exception.XSDFileNotExists
- AccessInput.Log.RequiredFilesMissing
- ChangeFileEncoding.Error.SourceFileNotExists
- Error reading DBF file
- Error retrieving command string
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/bbb89b62cd8009b8.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xsdvalidator/XsdValidator.java:202
SchemaFactory factoryXSDValidator = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI );
factoryXSDValidator.setFeature(
XMLConstants.FEATURE_SECURE_PROCESSING, true);
factoryXSDValidator.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
xsdfile = KettleVFS.getInstance( getTransMeta().getBowl() ).getFileObject( xsdfilename, getTransMeta() );
// Get XML stream
Source sourceXML = new StreamSource( new StringReader( XMLFieldvalue ) );
if ( meta.getXMLSourceFile() ) {
// We deal with XML file
// Get XML File
FileObject xmlfileValidator = KettleVFS.getInstance( getTransMeta().getBowl() ).getFileObject( XMLFieldvalue );
if ( xmlfileValidator == null || !xmlfileValidator.exists() ) {
logError( BaseMessages.getString( PKG, "XsdValidator.Log.Error.XMLfileMissing", XMLFieldvalue ) );
throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.XMLfileMissing",
XMLFieldvalue ) );
}
sourceXML = new StreamSource( xmlfileValidator.getContent().getInputStream() );
}
// create the schema
Schema SchematXSD = null;
if ( xsdfile instanceof AbstractFileObject ) {
if ( xsdfile.getName().getURI().contains( "ram:///" ) ) {
SchematXSD = factoryXSDValidator.newSchema( new StreamSource( xsdfile.getContent().getInputStream() ) );
} else {
SchematXSD = factoryXSDValidator.newSchema( new File( KettleVFS.getFilename( xsdfile ) ) );
}
} else {
// we should not get here as anything entered in that does not look like
// a url should be made a FileObject.
throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.Exception.CannotCreateSchema",
xsdfile.getClass().getName() ) );View on GitHub (pinned to f3058517a1)