{"record":{"id":"8802db8793e2a526","repo":"pentaho/pentaho-kettle","slug":"deletemeta-exception-unabletoreadstepinfofromxml","errorCode":"DeleteMeta.Exception.UnableToReadStepInfoFromXML","errorMessage":"DeleteMeta.Exception.UnableToReadStepInfoFromXML","messagePattern":"DeleteMeta\\.Exception\\.UnableToReadStepInfoFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/delete/DeleteMeta.java","lineNumber":241,"sourceCode":"      Node lookup = XMLHandler.getSubNode( stepnode, TAG_LOOKUP );\n      nrkeys = XMLHandler.countNodes( lookup, TAG_KEY );\n\n      allocate( nrkeys );\n\n      for ( int i = 0; i < nrkeys; i++ ) {\n        Node knode = XMLHandler.getSubNodeByNr( lookup, TAG_KEY, i );\n\n        keyFields[i].setKeyStream( XMLHandler.getTagValue( knode, TAG_NAME ) );\n        keyFields[i].setKeyLookup( XMLHandler.getTagValue( knode, TAG_FIELD ) );\n        keyFields[i].setKeyCondition( XMLHandler.getTagValue( knode, TAG_CONDITION ) );\n        if ( keyFields[i].getKeyCondition() == null ) {\n          keyFields[i].setKeyCondition( \"=\" );\n        }\n        keyFields[i].setKeyStream2( XMLHandler.getTagValue( knode, TAG_NAME2 ) );\n      }\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n              PKG, \"DeleteMeta.Exception.UnableToReadStepInfoFromXML\" ), e );\n    }\n  }\n\n  public void setDefault() {\n    databaseMeta = null;\n    commitSize = \"100\";\n    schemaName = \"\";\n    tableName = BaseMessages.getString( PKG, \"DeleteMeta.DefaultTableName.Label\" );\n\n    int nrkeys = 0;\n\n    allocate( nrkeys );\n  }\n\n  public String getXML() {\n    StringBuilder retval = new StringBuilder( 500 );\n","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/delete/DeleteMeta.java#L223-L259","documentation":"DeleteMeta.loadXML reads the step's definition from a .ktr XML file via readData. Any exception while parsing (missing/malformed nodes, unexpected structure) is wrapped in a KettleXMLException with this generic message, with the original cause attached. It signals the Delete step's XML block could not be deserialized.","triggerScenarios":"loadXML -> readData encounters Exception while reading the <delete> step XML (e.g. XMLHandler.getTagValue on missing/corrupt nodes, class-cast or number-format issues in the XML).","commonSituations":"Hand-edited or truncated .ktr file; transformation produced by a newer/older Pentaho version with a different XML schema; copy-paste of a step XML fragment that is malformed; encoding corruption.","solutions":["Inspect the cause chain of the KettleXMLException to find the exact parse failure.","Open the .ktr file and verify the Delete step XML block is complete and well-formed (all expected tags present).","Recreate the Delete step in Spoon and re-save the transformation to regenerate valid XML.","Align versions: open and re-save the transformation in the same Pentaho version used in production."],"exampleFix":"// before (corrupt fragment)\n<delete><connection>DB</connection>\n// after (complete block regenerated by Spoon)\n<delete><connection>DB</connection><schema/><table>CUSTOMERS</table><fields>...</fields></delete>","handlingStrategy":"try-catch","validationCode":"// Validate XML before loading\nDocumentBuilderFactory.newInstance().newDocumentBuilder()\n  .parse(new InputSource(new StringReader(ktrXml))); // well-formed check","typeGuard":null,"tryCatchPattern":"try { transMeta.loadXml(file); } catch (KettleXMLException e) {\n  log.error(\"Failed to load Delete step XML: {}\", e.getCause(), e);\n}","preventionTips":["Never hand-edit .ktr files; use Spoon.","Keep transformation source files in version control to detect corruption.","Re-save transformations after Pentaho version upgrades.","Validate XML well-formedness before loading programmatically."],"tags":["xml","kettle-metadata","deserialization"],"backgroundTag":"json-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"}