{"record":{"id":"a63236dfdec0722e","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-mondrianinputmeta","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/mondrianinput/impl/src/main/java/org/pentaho/di/trans/steps/mondrianinput/MondrianInputMeta.java","lineNumber":136,"sourceCode":"\n  public void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ) throws KettleXMLException {\n    readData( stepnode, databases );\n  }\n\n  public Object clone() {\n    MondrianInputMeta retval = (MondrianInputMeta) super.clone();\n    return retval;\n  }\n\n  private void readData( Node stepnode, List<DatabaseMeta> databases ) throws KettleXMLException {\n    try {\n      databaseMeta = DatabaseMeta.findDatabase( databases, XMLHandler.getTagValue( stepnode, \"connection\" ) );\n      sql = XMLHandler.getTagValue( stepnode, \"sql\" );\n      catalog = XMLHandler.getTagValue( stepnode, \"catalog\" );\n      role = XMLHandler.getTagValue( stepnode, \"role\" );\n      variableReplacementActive = \"Y\".equals( XMLHandler.getTagValue( stepnode, \"variables_active\" ) );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  public void setDefault() {\n    databaseMeta = null;\n    sql =\n      \"select\\n\"\n        + \" {([Gender].[F], [Measures].[Unit Sales]),\\n\" + \"  ([Gender].[M], [Measures].[Store Sales]),\\n\"\n        + \"  ([Gender].[F], [Measures].[Unit Sales])} on columns,\\n\"\n        + \" CrossJoin([Marital Status].Members,\\n\" + \"           [Product].Children) on rows\\n\"\n        + \"from [Sales]\";\n    variableReplacementActive = false;\n  }\n\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface row, String origin, RowMetaInterface[] info, StepMeta nextStep,\n    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    if ( databaseMeta == null ) {","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/mondrianinput/impl/src/main/java/org/pentaho/di/trans/steps/mondrianinput/MondrianInputMeta.java#L118-L154","documentation":"MondrianInputMeta.readData parses the step's XML node (connection, sql, catalog, role, variables_active tags) when a transformation is loaded from a .ktr file. Any exception during deserialization is wrapped in a KettleXMLException with this fixed message. It signals a malformed or incompatible step XML block in the transformation file.","triggerScenarios":"loadXML is called on a .ktr whose Mondrian input step node is missing expected child tags or contains values that make XMLHandler/DatabaseMeta.findDatabase throw (e.g. null stepnode, corrupt connection reference).","commonSituations":"Hand-edited or partially migrated .ktr files; transformations authored in a different PDI version with changed XML layout; truncated or corrupted exports.","solutions":["Open the .ktr in a text editor and verify the step XML node contains connection, sql, catalog, role and variables_active tags with valid values","Confirm the referenced connection name exists in the transformation's <connection> definitions","Recreate or re-save the Mondrian input step in Spoon to regenerate well-formed XML","Check PDI version compatibility between the file and the running engine"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate a .ktr before loading\nString xml = new String(Files.readAllBytes(Paths.get(\"trans.ktr\")), StandardCharsets.UTF_8);\nDocument doc = XMLHandler.loadXMLString(xml);\nNode step = XMLHandler.getSubNode(doc, \"step\");\nfor (String tag : new String[]{\"connection\", \"sql\", \"catalog\", \"role\", \"variables_active\"}) {\n  if (XMLHandler.getTagValue(step, tag) == null) {\n    throw new IllegalArgumentException(\"Missing tag in Mondrian step XML: \" + tag);\n  }\n}","typeGuard":"null","tryCatchPattern":"try {\n  transMeta = new TransMeta(\"trans.ktr\", metaStore);\n} catch (KettleXMLException e) {\n  if (e.getMessage().contains(\"Unable to load step info from XML\")) {\n    logError(\"Corrupt .ktr Mondrian step block; check XML tags\", e);\n  }\n}","preventionTips":["Never hand-edit .ktr XML; re-save steps from Spoon","Keep transformations in version control to restore corrupted files","Match PDI versions between authoring and execution environments","Validate XML with a linter after automated .ktr generation"],"tags":["xml","deserialization","ktr","mondrian"],"backgroundTag":"json-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"}