{"record":{"id":"7192a9f84c231357","repo":"pentaho/pentaho-kettle","slug":"unable-to-read-step-info-from-xml-node-dummypluginmeta","errorCode":null,"errorMessage":"Unable to read step info from XML node","messagePattern":"Unable to read step info from XML node","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/dummy/core/src/main/java/org/pentaho/di/be/ibridge/kettle/dummy/DummyPluginMeta.java","lineNumber":125,"sourceCode":"\n  @Override\n  public Object clone() {\n    Object retval = super.clone();\n    return retval;\n  }\n\n  @Override\n  public void loadXML( Node stepnode, List<DatabaseMeta> databases, Map<String, Counter> counters ) throws KettleXMLException {\n    try {\n      value = new ValueMetaAndData();\n\n      Node valnode = XMLHandler.getSubNode( stepnode, \"values\", \"value\" );\n      if ( valnode != null ) {\n        System.out.println( \"reading value in \" + valnode );\n        value.loadXML( valnode );\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to read step info from XML node\", e );\n    }\n  }\n\n  @Override\n  public void setDefault() {\n    value = new ValueMetaAndData( new ValueMetaNumber( \"valuename\" ), new Double( 123.456 ) );\n    value.getValueMeta().setLength( 12 );\n    value.getValueMeta().setPrecision( 4 );\n  }\n\n  @Override\n  public void readRep( Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters ) throws KettleException {\n    try {\n      String name = rep.getStepAttributeString( id_step, 0, \"value_name\" );\n      String typedesc = rep.getStepAttributeString( id_step, 0, \"value_type\" );\n      String text = rep.getStepAttributeString( id_step, 0, \"value_text\" );\n      boolean isnull = rep.getStepAttributeBoolean( id_step, 0, \"value_null\" );\n      int length = (int) rep.getStepAttributeInteger( id_step, 0, \"value_length\" );","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/dummy/core/src/main/java/org/pentaho/di/be/ibridge/kettle/dummy/DummyPluginMeta.java#L107-L143","documentation":"DummyPluginMeta.loadXML wraps any failure while deserializing the step's <values><value> node from a .ktr XML file into a KettleXMLException with this fixed message. It fires when XMLHandler navigation or ValueMetaAndData.loadXML throws, e.g. malformed XML, a missing/corrupt value node, or data that cannot be converted back into a ValueMeta. The original exception is preserved as the cause.","triggerScenarios":"Calling loadXML (directly or via TransMeta/Spoon loading a transformation) on a stepnode whose <values> section is absent-but-malformed, or whose <value> child contains attributes/elements ValueMetaAndData.loadXML cannot parse (bad name_type encoding, unparseable number/date text).","commonSituations":"Hand-edited or truncated .ktr files; transformations generated by other tools or older PDI versions whose <value> XML no longer matches ValueMetaAndData's expected format; XML files with encoding/charset corruption.","solutions":["Open the .ktr in a text editor and validate the <values><value> block for this Dummy step; fix or delete the malformed node.","Check the chained cause exception (e.getCause()) — it names the exact parse/conversion failure inside ValueMetaAndData.loadXML.","Recreate the Dummy step in Spoon (its setDefault() supplies a valid default value of 123.456) and re-save the transformation.","Verify the file's XML declaration/encoding matches the actual bytes (UTF-8 vs ISO-8859-1)."],"exampleFix":"// before: hand-edited ktr with corrupt value\n<values><value><name>amt</name><type>Number</type>12a.45</value></values>\n// after: valid node matching ValueMetaAndData.loadXML format\n<values><value><name>valuename</name><type>Number</type><length>12</length><precision>4</precision><isnull>N</isnull>123.456</value></values>","handlingStrategy":"validation","validationCode":"// validate the ktr XML before loading\nDocument doc = XMLHandler.loadXMLFile( new File( \"trans.ktr\" ) );\nNode step = XMLHandler.getSubNode( doc, \"transformation\", \"step\" );\nif ( XMLHandler.getSubNode( step, \"values\" ) == null ) {\n  throw new IllegalStateException( \"Dummy step missing <values> section\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  stepMeta.loadXML( stepnode, databases, counters );\n} catch ( KettleXMLException e ) {\n  logError( \"Bad XML for step: \" + e.getMessage() + \", cause=\" + e.getCause() );\n  // fall back to defaults or skip the step\n  stepMeta.setDefault();\n}","preventionTips":["Never hand-edit .ktr files; edit steps through Spoon","Keep transformation XML round-tripped through the same PDI version that loads it","Validate XML well-formedness (xmllint) before loading externally generated ktr files","Always inspect e.getCause() to find the real parse failure"],"tags":["xml","serialization","pdi","deserialization"],"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"}