{"record":{"id":"961f00b67d87199b","repo":"pentaho/pentaho-kettle","slug":"gpbulkloadermeta-exception-unabletoreadstepinfofromxml","errorCode":null,"errorMessage":"GPBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML","messagePattern":"GPBulkLoaderMeta\\.Exception\\.UnableToReadStepInfoFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkLoaderMeta.java","lineNumber":291,"sourceCode":"        fieldTable[i] = XMLHandler.getTagValue( vnode, \"stream_name\" );\n        fieldStream[i] = XMLHandler.getTagValue( vnode, \"field_name\" );\n        if ( fieldStream[i] == null ) {\n          fieldStream[i] = fieldTable[i]; // default: the same name!\n        }\n        String locDateMask = XMLHandler.getTagValue( vnode, \"date_mask\" );\n        if ( locDateMask == null ) {\n          dateMask[i] = \"\";\n        } else {\n          if ( GPBulkLoaderMeta.DATE_MASK_DATE.equals( locDateMask )\n            || GPBulkLoaderMeta.DATE_MASK_DATETIME.equals( locDateMask ) ) {\n            dateMask[i] = locDateMask;\n          } else {\n            dateMask[i] = \"\";\n          }\n        }\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"GPBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML\" ), e );\n    }\n  }\n\n  @Override\n  public void setDefault() {\n    fieldTable = null;\n    databaseMeta = null;\n    maxErrors = 50;\n    schemaName = \"\";\n    tableName = BaseMessages.getString( PKG, \"GPBulkLoaderMeta.DefaultTableName\" );\n    loadMethod = METHOD_AUTO_END;\n    loadAction = ACTION_APPEND;\n    PsqlPath = \"PsqlPath\";\n    controlFile = \"control${Internal.Step.CopyNr}.cfg\";\n    dataFile = \"load${Internal.Step.CopyNr}.dat\";\n    logFile = \"\";\n    encoding = \"\";","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/gp-bulk-loader/core/src/main/java/org/pentaho/di/trans/steps/gpbulkloader/GPBulkLoaderMeta.java#L273-L309","documentation":"GPBulkLoaderMeta.readData() parses the step's XML node to restore saved settings. Any unexpected exception during parsing (missing element dereferenced, wrong data type, malformed XML structure) is wrapped in a KettleXMLException whose message is the localized 'UnableToReadStepInfoFromXML' string. It is a generic deserialization-failure wrapper for this step's metadata.","triggerScenarios":"loadXML(node, ...) -> readData(node) encounters malformed or unexpected XML: an expected child element is absent so a lookup returns null and later code dereferences it; attribute values cannot be parsed (e.g. non-numeric where a number is expected); the XML node passed belongs to a different step or an incompatible plugin version.","commonSituations":"Transformation XML hand-edited and an element removed/renamed; transformation produced by a much older or newer plugin version with a schema change; corrupted repository export; copy-paste of step XML between transformations with incompatible metadata.","solutions":["Look at e.getCause() (and its stack trace line in readData) to find which attribute failed to parse.","Open the transformation in Spoon and re-save the GP Bulk Loader step so it regenerates valid XML.","Compare the step's <fields> XML block against a freshly created step and fix/remove the malformed element.","Upgrade or align the gp-bulk-loader plugin version with the one that wrote the transformation file."],"exampleFix":"// before: hand-edited step XML missing <field> sub-elements\n<field><name>id</name></field>\n\n// after: complete schema as written by Spoon\n<field>\n  <column_name>id</column_name>\n  <stream_name>id</stream_name>\n  <date_mask></date_mask>\n</field>","handlingStrategy":"try-catch","validationCode":"// validate the step XML before loading it\norg.w3c.dom.Node stepNode = /* the <step> node */;\nif (!\"GPBulkLoader\".equals(\n      org.pentaho.di.core.xml.XMLHandler.getTagValue(stepNode, \"type\")))\n  throw new IllegalArgumentException(\"Node is not a GPBulkLoader step\");\nif (org.pentaho.di.core.xml.XMLHandler.getNodes(stepNode, \"fields\").isEmpty())\n  throw new IllegalArgumentException(\"GPBulkLoader step XML missing <fields> block\");","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.loadXML(file, null, null, null, null, true, listener);\n} catch (KettleXMLException e) {\n  if (e.getMessage().contains(\"UnableToReadStepInfoFromXML\")) {\n    logError(\"GPBulkLoader step XML unreadable\", e.getCause());\n    // re-create the step in Spoon or repair the XML element identified by the cause\n  } else throw e;\n}","preventionTips":["Never hand-edit transformation XML; configure steps through Spoon","Keep the gp-bulk-loader plugin version consistent across environments","When importing transformations, re-save suspicious steps to regenerate valid XML"],"tags":["xml","deserialization","metadata","kettle"],"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"}