{"record":{"id":"4fadad63793b6124","repo":"pentaho/pentaho-kettle","slug":"insertupdatemeta-exception-unabletoreadstepinfofromxml","errorCode":null,"errorMessage":"InsertUpdateMeta.Exception.UnableToReadStepInfoFromXML","messagePattern":"InsertUpdateMeta\\.Exception\\.UnableToReadStepInfoFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/insertupdate/InsertUpdateMeta.java","lineNumber":283,"sourceCode":"        updateFields[ i ].setUpdateLookup( XMLHandler.getTagValue( vnode, \"name\" ) );\n        updateFields[ i ].setUpdateStream( XMLHandler.getTagValue( vnode, \"rename\" ) );\n        if ( updateFields[ i ].getUpdateStream() == null ) {\n          updateFields[ i ].setUpdateStream( updateFields[ i ].getUpdateLookup() ); // default: the same name!\n        }\n        String updateValue = XMLHandler.getTagValue( vnode, \"update\" );\n        if ( updateValue == null ) {\n          // default TRUE\n          updateFields[ i ].setUpdate( Boolean.TRUE );\n        } else {\n          if ( updateValue.equalsIgnoreCase( \"Y\" ) ) {\n            updateFields[ i ].setUpdate( Boolean.TRUE );\n          } else {\n            updateFields[ i ].setUpdate( Boolean.FALSE );\n          }\n        }\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"InsertUpdateMeta.Exception.UnableToReadStepInfoFromXML\" ), e );\n    }\n  }\n\n  public void setDefault() {\n    databaseMeta = null;\n    commitSize = \"100\";\n    schemaName = \"\";\n    tableName = BaseMessages.getString( PKG, \"InsertUpdateMeta.DefaultTableName\" );\n\n    int nrkeys = 0;\n    int nrvalues = 0;\n\n    allocate( nrkeys, nrvalues );\n\n    for ( int i = 0; i < nrkeys; i++ ) {\n      keyFields[ i ].setKeyLookup( \"age\" );\n      keyFields[ i ].setKeyCondition( \"BETWEEN\" );","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/insertupdate/InsertUpdateMeta.java#L265-L301","documentation":"loadXML could not parse the Insert/Update step's XML definition; any exception while reading the key/update field configuration in readData is wrapped in a KettleXMLException. The .ktr file's XML for this step is malformed or contains unexpected content.","triggerScenarios":"Hand-edited .ktr with broken XML or wrong element structure; git merge conflict resolved incorrectly; older PDI version reading attributes written by a newer version; attribute values (e.g. non-boolean 'update' flag) that throw during parsing.","commonSituations":"Merging transformation XML by hand across branches; corrupted/truncated file transfer; opening a newer-version .ktr in an older PDI.","solutions":["Open the .ktr in a text editor, locate the <step> block for this Insert/Update step, and fix malformed XML or field elements.","Restore the transformation from version control or backup.","Open the file in the matching (or newer) PDI version that wrote it.","Check the wrapped cause exception in the log to pinpoint the failing element/attribute."],"exampleFix":"<!-- before: broken field element -->\n<field><name>id</name><update>m aybe</update></field>\n<!-- after -->\n<field><name>id</name><update>Y</update></field>","handlingStrategy":"try-catch","validationCode":"// validate .ktr XML before loading\nDocumentBuilderFactory f = DocumentBuilderFactory.newInstance();\nf.newDocumentBuilder().parse(new File(\"trans.ktr\")); // throws if malformed","typeGuard":"null","tryCatchPattern":"try { transMeta = new TransMeta(\"trans.ktr\", metaStore); }\ncatch (KettleXMLException e) {\n  logError(\"Step XML unreadable; cause:\", e.getCause()); // inspect which element failed\n  throw e;\n}","preventionTips":["Avoid hand-editing .ktr files; use Spoon for metadata changes.","Resolve git merge conflicts in .ktr files carefully and re-open in Spoon to verify.","Open files with the same or newer PDI version that produced them.","Keep backups of transformations before bulk edits."],"tags":["kettle","xml","serialization","metadata"],"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"}