{"record":{"id":"9556d901f81e8b18","repo":"pentaho/pentaho-kettle","slug":"xsd001","errorCode":"XSD001","errorMessage":"XsdValidator.ErrorProcesing","messagePattern":"XsdValidator\\.ErrorProcesing","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xsdvalidator/XsdValidator.java","lineNumber":308,"sourceCode":"      }\n\n      // add new values to the row.\n      putRow( data.outputRowMeta, outputRowData2 ); // copy row to output rowset(s);\n    } catch ( KettleException e ) {\n      boolean sendToErrorRow = false;\n      String errorMessage = null;\n\n      if ( getStepMeta().isDoingErrorHandling() ) {\n        sendToErrorRow = true;\n        errorMessage = e.toString();\n      }\n\n      if ( sendToErrorRow ) {\n        // Simply add this row to the error row\n        putError( getInputRowMeta(), row, 1, errorMessage, null, \"XSD001\" );\n      } else {\n        logError( BaseMessages.getString( PKG, \"XsdValidator.ErrorProcesing\" + \" : \" + e.getMessage() ) );\n        throw new KettleStepException( BaseMessages.getString( PKG, \"XsdValidator.ErrorProcesing\" ), e );\n      }\n    }\n\n    return true;\n\n  }\n\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    meta = (XsdValidatorMeta) smi;\n    data = (XsdValidatorData) sdi;\n\n    if ( super.init( smi, sdi ) ) {\n      // Add init code here.\n      return true;\n    }\n    return false;\n  }\n","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xsdvalidator/XsdValidator.java#L290-L326","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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)"],"exampleFix":"// before\n// no error handling: transformation stops on first bad XML row\n// after\n// In the step dialog: Settings > Error handling -> discard/route error rows\nstepmeta.setSupportsErrorHandling(true);","handlingStrategy":"try-catch","validationCode":"// Before the step: ensure XML is well-formed and field not null\nif (xmlFieldValue == null || xmlFieldValue.trim().isEmpty()) { routeToErrorRow(row, \"empty XML\"); }","typeGuard":null,"tryCatchPattern":"try { validateRow(row); } catch (KettleStepException e) { if (e.getCause() instanceof SAXException) { logValidationDetail(e.getCause()); } else { throw e; } }","preventionTips":["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"],"tags":["kettle","xsd-validator","validation-failed","catch-all"],"backgroundTag":"schema-validation-failed","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"}