pentaho/pentaho-kettle · error · KettleXMLException
ExecSQLRowMeta.Exception.UnableToLoadStepInfoFromXML
Error message
ExecSQLRowMeta.Exception.UnableToLoadStepInfoFromXML
What it means
KettleXMLException thrown by ExecSQLRowMeta.readData() (invoked via loadXML) when an unexpected Exception occurs while parsing the step's XML node (read_field, sqlFromfile, sendOneStatement attributes). It wraps the parse exception so the transformation cannot load from its .ktr file.
Solutions
- Open the .ktr in an XML editor and validate it is well-formed; fix the ExecSQLRow step node.
- Check getCause() of KettleXMLException for the exact DOM/parse error and line.
- Recreate the step in Spoon and re-save the transformation.
- Restore the .ktr from version control/backup.
Example fix
// before: malformed hand-edited node <read_field>true</read_field> <!-- missing wrapper --> // after: well-formed step XML <read_field>Y</read_field> <sqlFromfile>N</sqlFromfile> <sendOneStatement>Y</sendOneStatement>
Defensive patterns
Strategy: try-catch
Validate before calling
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(ktrPath)); // validate well-formedness before loading
Try / catch
try { transMeta = new TransMeta(ktrPath); } catch (KettleXMLException e) { log.error("ktr parse failed: " + e.getCause(), e); } Prevention
- Don't hand-edit .ktr files
- Keep source control on transformations
- Validate XML after any programmatic edit
When it happens
Trigger: loadXML()/readData() hits an exception in XMLHandler.getTagValue parsing — malformed .ktr XML, missing stepnode structure, or DOM error while reading the ExecSQLRow step's node.
Common situations: Hand-edited or truncated .ktr file; XML saved by an older/newer Pentaho version with unexpected structure; file encoding corruption; copy-paste of step XML between transformations stripped attributes.
Related errors
- Unable to load step info from XML
- AppendMeta.Exception.UnableToLoadStepInfo
- CombinationLookupMeta.Exception.UnableToLoadStepInfo
- ERROR_0001_Cannot_Load_Job_Entry_From_Xml_Node
- ExecProcessMeta.Exception.UnableToReadStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/38b8753eb3b4cd4d.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/execsqlrow/ExecSQLRowMeta.java:265
this.databasesList = databases;
try {
String csize;
String con = XMLHandler.getTagValue( stepnode, "connection" );
databaseMeta = DatabaseMeta.findDatabase( databases, con );
csize = XMLHandler.getTagValue( stepnode, "commit" );
commitSize = Const.toInt( csize, 0 );
sqlField = XMLHandler.getTagValue( stepnode, "sql_field" );
insertField = XMLHandler.getTagValue( stepnode, "insert_field" );
updateField = XMLHandler.getTagValue( stepnode, "update_field" );
deleteField = XMLHandler.getTagValue( stepnode, "delete_field" );
readField = XMLHandler.getTagValue( stepnode, "read_field" );
sqlFromfile = "Y".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, "sqlFromfile" ) );
sendOneStatement =
"Y".equalsIgnoreCase( Const.NVL( XMLHandler.getTagValue( stepnode, "sendOneStatement" ), "Y" ) );
} catch ( Exception e ) {
throw new KettleXMLException( BaseMessages.getString(
PKG, "ExecSQLRowMeta.Exception.UnableToLoadStepInfoFromXML" ), e );
}
}
public void setDefault() {
sqlFromfile = false;
commitSize = 1;
databaseMeta = null;
sqlField = null;
sendOneStatement = true;
}
@Override
public void getFields( Bowl bowl, RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep,
VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
RowMetaAndData add =
ExecSQL.getResultRow( new Result(), getUpdateField(), getInsertField(), getDeleteField(), getReadField() );
View on GitHub (pinned to f3058517a1)