{"record":{"id":"5263041b0e0e112b","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-salesforceinsertmeta","errorCode":null,"errorMessage":"Unable to load step info from XML","messagePattern":"Unable to load step info from XML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinsert/SalesforceInsertMeta.java","lineNumber":240,"sourceCode":"          updateStream[i] = updateLookup[i]; // default: the same name!\n        }\n        String updateValue = XMLHandler.getTagValue( fnode, \"useExternalId\" );\n        if ( updateValue == null ) {\n          // default FALSE\n          useExternalId[i] = Boolean.FALSE;\n        } else {\n          if ( updateValue.equalsIgnoreCase( \"Y\" ) ) {\n            useExternalId[i] = Boolean.TRUE;\n          } else {\n            useExternalId[i] = Boolean.FALSE;\n          }\n        }\n      }\n      setRollbackAllChangesOnError(\n        \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"rollbackAllChangesOnError\" ) ) );\n\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  public void allocate( int nrvalues ) {\n    setUpdateLookup( new String[nrvalues] );\n    setUpdateStream( new String[nrvalues] );\n    setUseExternalId( new Boolean[nrvalues] );\n  }\n\n  public void setDefault() {\n    super.setDefault();\n    setBatchSize( \"10\" );\n    setSalesforceIDFieldName( \"Id\" );\n\n    allocate( 0 );\n\n    setRollbackAllChangesOnError( false );\n  }","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceinsert/SalesforceInsertMeta.java#L222-L258","documentation":"SalesforceInsertMeta.readData() wraps the whole XML deserialization of the step's configuration in a try/catch and rethrows any exception as a KettleXMLException with the generic message 'Unable to load step info from XML'. It means the <step> XML node for a Salesforce Insert step could not be parsed — typically a malformed tag, missing attribute, or an unexpected value when the transformation .ktr file was read. The original cause is chained as the 'cause' of the KettleXMLException.","triggerScenarios":"Calling loadXML(Node stepnode, ...) on a SalesforceInsertMeta whose XML node is corrupt: XMLHandler.getTagValue() throws or returns data that fails parsing, e.g. during TransMeta.loadXML of a .ktr file containing a salesforce-insert step whose XML block is hand-edited, truncated, or produced by an incompatible PDI version.","commonSituations":"Opening a transformation edited by hand or by another tool; upgrading PDI and loading a .ktr written by an older/newer plugin version; a copied XML snippet pasted into the .ktr with missing or malformed child tags like rollbackAllChangesOnError.","solutions":["Read the chained cause (e.getCause()) of the KettleXMLException — it names the exact tag/value that failed to parse.","Open the .ktr in a text editor and locate the Salesforce Insert <step> XML block; fix malformed/missing tags or remove the step and re-add it in Spoon.","Regenerate the transformation in the same PDI version that will run it (avoid round-tripping across major versions).","If version migration is required, export/import via Spoon rather than editing XML directly."],"exampleFix":"// before: hand-edited step XML\n<rollbackAllChangesOnError>yes</rollbackAllChangesOnError>\n// after: parser expects Y/N comparison via \"Y\".equalsIgnoreCase(...)\n<rollbackAllChangesOnError>Y</rollbackAllChangesOnError>","handlingStrategy":"try-catch","validationCode":"// Validate the step XML block before loading\norg.w3c.dom.NodeList steps = doc.getElementsByTagName(\"step\");\nfor (int i = 0; i < steps.getLength(); i++) {\n  Node n = steps.item(i);\n  if (XMLHandler.getTagValue(n, \"type\").equals(\"SalesforceInsert\")\n      && XMLHandler.getTagValue(n, \"connection\") == null) {\n    throw new IllegalArgumentException(\"SalesforceInsert step XML is incomplete\");\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta = new TransMeta(ktrFile);\n} catch (KettleXMLException e) {\n  log.error(\"Step XML load failed: {}\", e.getCause() != null ? e.getCause().getMessage() : e.getMessage(), e);\n  throw e;\n}","preventionTips":["Never hand-edit .ktr XML; make step changes in Spoon.","Pin one PDI version for authoring and execution.","Keep .ktr files in version control and review merge conflicts around step blocks.","Always log the chained cause when catching KettleXMLException."],"tags":["kettle","xml-parsing","step-metadata","salesforce"],"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"}