{"record":{"id":"38b8753eb3b4cd4d","repo":"pentaho/pentaho-kettle","slug":"execsqlrowmeta-exception-unabletoloadstepinfofromxml","errorCode":null,"errorMessage":"ExecSQLRowMeta.Exception.UnableToLoadStepInfoFromXML","messagePattern":"ExecSQLRowMeta\\.Exception\\.UnableToLoadStepInfoFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/execsqlrow/ExecSQLRowMeta.java","lineNumber":265,"sourceCode":"    this.databasesList = databases;\n    try {\n      String csize;\n      String con = XMLHandler.getTagValue( stepnode, \"connection\" );\n      databaseMeta = DatabaseMeta.findDatabase( databases, con );\n      csize = XMLHandler.getTagValue( stepnode, \"commit\" );\n      commitSize = Const.toInt( csize, 0 );\n      sqlField = XMLHandler.getTagValue( stepnode, \"sql_field\" );\n\n      insertField = XMLHandler.getTagValue( stepnode, \"insert_field\" );\n      updateField = XMLHandler.getTagValue( stepnode, \"update_field\" );\n      deleteField = XMLHandler.getTagValue( stepnode, \"delete_field\" );\n      readField = XMLHandler.getTagValue( stepnode, \"read_field\" );\n      sqlFromfile = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"sqlFromfile\" ) );\n\n      sendOneStatement =\n        \"Y\".equalsIgnoreCase( Const.NVL( XMLHandler.getTagValue( stepnode, \"sendOneStatement\" ), \"Y\" ) );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"ExecSQLRowMeta.Exception.UnableToLoadStepInfoFromXML\" ), e );\n    }\n  }\n\n  public void setDefault() {\n    sqlFromfile = false;\n    commitSize = 1;\n    databaseMeta = null;\n    sqlField = null;\n    sendOneStatement = true;\n  }\n\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep,\n    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    RowMetaAndData add =\n      ExecSQL.getResultRow( new Result(), getUpdateField(), getInsertField(), getDeleteField(), getReadField() );\n","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/execsqlrow/ExecSQLRowMeta.java#L247-L283","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: malformed hand-edited node\n<read_field>true</read_field> <!-- missing wrapper -->\n// after: well-formed step XML\n<read_field>Y</read_field>\n<sqlFromfile>N</sqlFromfile>\n<sendOneStatement>Y</sendOneStatement>","handlingStrategy":"try-catch","validationCode":"DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(ktrPath)); // validate well-formedness before loading","typeGuard":null,"tryCatchPattern":"try { transMeta = new TransMeta(ktrPath); } catch (KettleXMLException e) { log.error(\"ktr parse failed: \" + e.getCause(), e); }","preventionTips":["Don't hand-edit .ktr files","Keep source control on transformations","Validate XML after any programmatic edit"],"tags":["xml","parse","metadata-load","kettle"],"backgroundTag":"xml-parse-error","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"}