{"record":{"id":"b9dbef5b95de3efd","repo":"pentaho/pentaho-kettle","slug":"dimensionlookupmeta-exception-unabletoloadstepinfofromxml","errorCode":null,"errorMessage":"DimensionLookupMeta.Exception.UnableToLoadStepInfoFromXML","messagePattern":"DimensionLookupMeta\\.Exception\\.UnableToLoadStepInfoFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/dimensionlookup/DimensionLookupMeta.java","lineNumber":959,"sourceCode":"      minYear = Const.toInt( XMLHandler.getTagValue( stepnode, \"min_year\" ), Const.MIN_YEAR );\n\n      keyField = XMLHandler.getTagValue( fields, \"return\", \"name\" );\n      keyRename = XMLHandler.getTagValue( fields, \"return\", \"rename\" );\n      autoIncrement = !\"N\".equalsIgnoreCase( XMLHandler.getTagValue( fields, \"return\", \"use_autoinc\" ) );\n      versionField = XMLHandler.getTagValue( fields, \"return\", \"version\" );\n\n      setTechKeyCreation( XMLHandler.getTagValue( fields, \"return\", \"creation_method\" ) );\n\n      cacheSize = Const.toInt( XMLHandler.getTagValue( stepnode, \"cache_size\" ), -1 );\n      preloadingCache = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"preload_cache\" ) );\n      useBatchUpdate = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"useBatch\" ) );\n\n      usingStartDateAlternative =\n          \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( stepnode, \"use_start_date_alternative\" ) );\n      startDateAlternative = getStartDateAlternative( XMLHandler.getTagValue( stepnode, \"start_date_alternative\" ) );\n      startDateFieldName = XMLHandler.getTagValue( stepnode, \"start_date_field_name\" );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG,\n          \"DimensionLookupMeta.Exception.UnableToLoadStepInfoFromXML\" ), e );\n    }\n  }\n\n  @Override\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases )\n    throws KettleException {\n    try {\n      this.databases = databases;\n      databaseMeta = rep.loadDatabaseMetaFromStepAttribute( id_step, \"id_connection\", databases );\n\n      schemaName = rep.getStepAttributeString( id_step, \"schema\" );\n      tableName = rep.getStepAttributeString( id_step, \"table\" );\n      commitSize = (int) rep.getStepAttributeInteger( id_step, \"commit\" );\n      update = rep.getStepAttributeBoolean( id_step, \"update\" );\n\n      int nrkeys = rep.countNrStepAttributes( id_step, \"lookup_key_name\" );\n      int nrfields = rep.countNrStepAttributes( id_step, \"field_update\" );","sourceCodeStart":941,"sourceCodeEnd":977,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/dimensionlookup/DimensionLookupMeta.java#L941-L977","documentation":"loadXML() deserializes the step's configuration from the transformation XML (stepnode) using XMLHandler tag reads. If any of those reads or subsequent parsing throws, the whole block is caught and rethrown as a KettleXMLException with the localized 'Unable to load step info from XML' message. It indicates the step's XML representation is malformed or contains values the current code cannot parse.","triggerScenarios":"Any exception while reading tags such as key_field, table_name, fields, use_start_date_alternative, start_date_alternative, or start_date_field_name from the step node — e.g. getStartDateAlternative cannot map an unknown string to its enum constant.","commonSituations":"Transformations authored by newer/older Kettle versions with changed tag names or values; hand-edited or truncated .ktr files; copy-pasted step XML missing required tags; an unrecognized start_date_alternative value.","solutions":["Open the .ktr in Spoon and re-save the step to regenerate valid XML","Inspect the wrapped cause (getCause()) to find the exact tag/value that failed to parse","Compare the step XML block against a working Dimension Lookup step's XML and fix or remove invalid tags (especially start_date_alternative)","Align the file with the Kettle version that will run it, or upgrade the Pentaho/Kettle engine","Restore the transformation from backup if the XML was hand-edited or truncated"],"exampleFix":"// before: hand-edited XML with unknown alternative value\n<start_date_alternative>tomorrow</start_date_alternative>\n// after\n<start_date_alternative>system_date</start_date_alternative>","handlingStrategy":"try-catch","validationCode":"// Java: sanity-check the step XML before loading\norg.w3c.dom.Node stepnode = XMLHandler.getSubNode(transNode, \"step\");\nif (XMLHandler.getTagValue(stepnode, \"start_date_alternative\") == null\n    && \"Y\".equalsIgnoreCase(XMLHandler.getTagValue(stepnode, \"use_start_date_alternative\"))) {\n  throw new IllegalArgumentException(\"use_start_date_alternative set but start_date_alternative missing\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  meta.loadXML(stepnode, databases, metaStore);\n} catch (KettleXMLException e) {\n  if (e.getMessage().contains(\"UnableToLoadStepInfoFromXML\")) {\n    logError(\"Bad DimensionLookup XML: \" + e.getCause());\n    // re-create the step in Spoon or fix/remove the offending tag\n  } else throw e;\n}","preventionTips":["Never hand-edit step XML; use Spoon to edit and save","Restore from a version-controlled .ktr when XML was modified externally","Check version compatibility of transformation files with your Kettle engine","Always inspect getCause() — it names the tag/value that failed to parse"],"tags":["xml","deserialization","configuration","dimension-lookup"],"backgroundTag":"xml-unmarshal-failed","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"}