{"record":{"id":"f786842c31485ea8","repo":"pentaho/pentaho-kettle","slug":"updatemeta-exception-unabletoreadstepinfofromxml","errorCode":null,"errorMessage":"UpdateMeta.Exception.UnableToReadStepInfoFromXML","messagePattern":"UpdateMeta\\.Exception\\.UnableToReadStepInfoFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/update/UpdateMeta.java","lineNumber":411,"sourceCode":"        keyLookup[i] = XMLHandler.getTagValue( knode, \"field\" );\n        keyCondition[i] = XMLHandler.getTagValue( knode, \"condition\" );\n        if ( keyCondition[i] == null ) {\n          keyCondition[i] = \"=\";\n        }\n        keyStream2[i] = XMLHandler.getTagValue( knode, \"name2\" );\n      }\n\n      for ( int i = 0; i < nrvalues; i++ ) {\n        Node vnode = XMLHandler.getSubNodeByNr( lookup, \"value\", i );\n\n        updateLookup[i] = XMLHandler.getTagValue( vnode, \"name\" );\n        updateStream[i] = XMLHandler.getTagValue( vnode, \"rename\" );\n        if ( updateStream[i] == null ) {\n          updateStream[i] = updateLookup[i]; // default: the same name!\n        }\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"UpdateMeta.Exception.UnableToReadStepInfoFromXML\" ), e );\n    }\n  }\n\n  @Override\n  public void setDefault() {\n    skipLookup = false;\n    keyStream = null;\n    updateLookup = null;\n    databaseMeta = null;\n    commitSize = \"100\";\n    schemaName = \"\";\n    tableName = BaseMessages.getString( PKG, \"UpdateMeta.DefaultTableName\" );\n\n    int nrkeys = 0;\n    int nrvalues = 0;\n\n    allocate( nrkeys, nrvalues );","sourceCodeStart":393,"sourceCodeEnd":429,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/update/UpdateMeta.java#L393-L429","documentation":"UpdateMeta.readData failed while parsing the step's XML definition with XMLHandler; any Exception is wrapped in a KettleXMLException with the UnableToReadStepInfoFromXML message. This happens when loading a transformation (.ktr) that contains an Update step.","triggerScenarios":"loadXML -> readData throws while reading <lookup>/<update> tags; malformed or hand-edited XML, missing tags, or unexpected element structure.","commonSituations":"Manually edited or corrupted .ktr files; XML produced by a different PDI version with a changed schema; truncation of file contents.","solutions":["Open the .ktr in Spoon to see if it loads and repair the Update step's XML section","Validate the <update> block structure (lookup, key, value, rename tags) against a working example","Compare file against a version-control copy to find the corrupt/removed tag","Upgrade/downgrade PDI to match the version that authored the file"],"exampleFix":"// before (malformed XML)\n<rename></stream>\n// after\n<rename>customer_name</rename>","handlingStrategy":"try-catch","validationCode":"// Validate .ktr XML before load:\n// Document d = XMLHandler.loadXMLFile(ktrFile); // check <update> step block parses and tags exist","typeGuard":null,"tryCatchPattern":"try { transMeta.loadXML(file, ...); } catch (KettleXMLException e) { log.error(\"Failed to parse Update step XML: \" + e.getMessage(), e); }","preventionTips":["Never hand-edit .ktr files; edit via Spoon","Keep .ktr files in version control to diff/repair corruption","Use the same PDI version to author and consume transformation files"],"tags":["xml","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"}