{"record":{"id":"d057f72061ffbba8","repo":"pentaho/pentaho-kettle","slug":"xslt01","errorCode":"XSLT01","errorMessage":"Xslt.ErrorProcesing","messagePattern":"Xslt\\.ErrorProcesing","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java","lineNumber":262,"sourceCode":"      }\n      Object[] outputRowData = RowDataUtil.addValueData( row, getInputRowMeta().size(), xmlString );\n\n      if ( log.isRowLevel() ) {\n        logRowlevel( BaseMessages.getString( PKG, \"Xslt.Log.ReadRow\" ) + \" \" + getInputRowMeta().getString( row ) );\n      }\n\n      // add new values to the row.\n      putRow( data.outputRowMeta, outputRowData ); // copy row to output rowset(s);\n\n    } catch ( Exception e ) {\n      String errorMessage = e.getClass().toString() + \": \" + e.getMessage();\n\n      if ( getStepMeta().isDoingErrorHandling() ) {\n        // Simply add this row to the error row\n        putError( getInputRowMeta(), row, 1, errorMessage, meta.getResultfieldname(), \"XSLT01\" );\n      } else {\n        logError( BaseMessages.getString( PKG, \"Xslt.ErrorProcesing\" + \" : \" + errorMessage ), e );\n        throw new KettleStepException( BaseMessages.getString( PKG, \"Xslt.ErrorProcesing\" ), e );\n      }\n    }\n\n    return true;\n  }\n\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    meta = (XsltMeta) smi;\n    data = (XsltData) sdi;\n    if ( super.init( smi, sdi ) ) {\n      // Specify weither or not we have to deal with XSL filename\n      data.xslIsAfile = ( meta.useXSLField() && meta.isXSLFieldIsAFile() ) || ( !meta.useXSLField() );\n      // Add init code here.\n      return true;\n    }\n    return false;\n  }\n","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/xml/core/src/main/java/org/pentaho/di/trans/steps/xslt/Xslt.java#L244-L280","documentation":"Generic wrapping error thrown when the XSLT step fails to process a row's transformation. If the step meta has error handling configured, the row is routed to the error stream via putError with code XSLT01; otherwise the step logs and rethrows a KettleStepException wrapping the original exception. It covers XML parsing, TransformerFactory, and output-conversion failures.","triggerScenarios":"Any Exception while transforming a row: malformed XML in the XML field, XSLT stylesheet compile errors, invalid result type conversion, or Transformer configuration (output properties) problems.","commonSituations":"Field contains XML with encoding issues or invalid characters; stylesheet references non-existent functions (e.g. XSLT 2.0 features on an XSLT 1.0 processor); result field name/type mismatch; JVM lacking a suitable TransformerFactory.","solutions":["Read the wrapped cause ('Caused by') to identify the real failure; enable error handling on the step to route bad rows instead of aborting","Validate the XML field content (well-formed, correct encoding) before the XSLT step","Verify the stylesheet compiles with the JVM's default XSLT processor version; simplify output properties if misconfigured"],"exampleFix":"// before\nthrow new KettleStepException( BaseMessages.getString( PKG, \"Xslt.ErrorProcesing\" ), e );\n// after\n// configure step error handling so bad rows go to the error stream:\n// putError( getInputRowMeta(), row, 1, errorMessage, meta.getResultfieldname(), \"XSLT01\" );","handlingStrategy":"try-catch","validationCode":"// Validate XML and stylesheet before transforming\nDocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(xmlField)));\nTransformerFactory.newInstance().newTransformer(new StreamSource(new File(xslFilename)));","typeGuard":null,"tryCatchPattern":"try {\n    transformation.execute(...);\n} catch (KettleStepException e) {\n    Throwable cause = e.getCause();\n    log.error(\"XSLT processing failed: \" + (cause != null ? cause : e.getMessage()));\n    // route row to error handling / quarantine\n}","preventionTips":["Configure step error handling so failing rows go to the error stream instead of aborting","Validate XML field content upstream (well-formedness, encoding)","Test the stylesheet against the JVM's XSLT processor version before production"],"tags":["xslt","kettle","transformation-failed","error-handling"],"backgroundTag":"xslt-processing-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"}