pentaho/pentaho-kettle · error · KettleStepException
XSD001
XSD001
Error message
XsdValidator.ErrorProcesing
What it means
Generic catch-all: when validation/processing of a row throws and error handling (putError) is not enabled, the step logs 'ErrorProcesing' with the cause message and rethrows a KettleStepException wrapping the original exception. Any SAX/IO/NPE during schema creation or xsdValidator.validate() ends here.
Solutions
- Read the wrapped 'cause' in the stack trace for the real parse/validation error
- Enable step error handling so invalid rows go to an error stream (putError with XSD001) instead of failing the transformation
- Validate the XSD itself is well-formed and loads in an XML editor
- Null-check the XML field value before the step (filter empty rows)
Example fix
// before // no error handling: transformation stops on first bad XML row // after // In the step dialog: Settings > Error handling -> discard/route error rows stepmeta.setSupportsErrorHandling(true);
Defensive patterns
Strategy: try-catch
Validate before calling
// Before the step: ensure XML is well-formed and field not null
if (xmlFieldValue == null || xmlFieldValue.trim().isEmpty()) { routeToErrorRow(row, "empty XML"); } Try / catch
try { validateRow(row); } catch (KettleStepException e) { if (e.getCause() instanceof SAXException) { logValidationDetail(e.getCause()); } else { throw e; } } Prevention
- Enable step error handling so bad rows go to the error stream instead of killing the transformation
- Validate the XSD itself once at startup
- Always inspect the wrapped cause in the stack trace for the root parse error
When it happens
Trigger: Any Exception in the try block after config checks: malformed XML/XSD content, SchemaFactory failure, SAXException from validate() — while sendToErrorRow is false (step-level error handling not configured).
Common situations: XML content that does not match the XSD with no error-row handling enabled; invalid XSD documents themselves; transformer/parser configuration exceptions; NPEs from null field values.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- XsdValidator.Exception.CannotCreateSchema
- XsdValidator.Exception.DisallowedDocType
- XsdValidator.Exception.ErrorFindingXSDField
- XsdValidator.Exception.ErrorXSDFileMissing
- XsdValidator.Exception.GettingXSDFile
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/9556d901f81e8b18.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xsdvalidator/XsdValidator.java:308
}
// add new values to the row.
putRow( data.outputRowMeta, outputRowData2 ); // copy row to output rowset(s);
} catch ( KettleException e ) {
boolean sendToErrorRow = false;
String errorMessage = null;
if ( getStepMeta().isDoingErrorHandling() ) {
sendToErrorRow = true;
errorMessage = e.toString();
}
if ( sendToErrorRow ) {
// Simply add this row to the error row
putError( getInputRowMeta(), row, 1, errorMessage, null, "XSD001" );
} else {
logError( BaseMessages.getString( PKG, "XsdValidator.ErrorProcesing" + " : " + e.getMessage() ) );
throw new KettleStepException( BaseMessages.getString( PKG, "XsdValidator.ErrorProcesing" ), e );
}
}
return true;
}
public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
meta = (XsdValidatorMeta) smi;
data = (XsdValidatorData) sdi;
if ( super.init( smi, sdi ) ) {
// Add init code here.
return true;
}
return false;
}
View on GitHub (pinned to f3058517a1)