{"record":{"id":"75477d2ac1df7e0d","repo":"pentaho/pentaho-kettle","slug":"gpbulkloadermeta-exception-unabletoreadstepinfofromxml-75477d","errorCode":"GPBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML","errorMessage":"GPBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML","messagePattern":"GPBulkLoaderMeta\\.Exception\\.UnableToReadStepInfoFromXML","errorType":"error_code","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/postgresql-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/pgbulkloader/PGBulkLoaderMeta.java","lineNumber":256,"sourceCode":"        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 ( PGBulkLoaderMeta.DATE_MASK_DATE.equals( locDateMask )\n            || PGBulkLoaderMeta.DATE_MASK_PASS_THROUGH.equals( locDateMask )\n            || PGBulkLoaderMeta.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  public void setDefault() {\n    fieldTable = null;\n    databaseMeta = null;\n    schemaName = \"\";\n    tableName = BaseMessages.getString( PKG, \"GPBulkLoaderMeta.DefaultTableName\" );\n    dbNameOverride = \"\";\n    delimiter = \";\";\n    enclosure = \"\\\"\";\n    stopOnError = false;\n    int nrvalues = 0;\n    allocate( nrvalues );\n  }\n\n  public String getXML() {","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/postgresql-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/pgbulkloader/PGBulkLoaderMeta.java#L238-L274","documentation":"PGBulkLoaderMeta.readData parses the step's XML (Node) into metadata fields; any exception during parsing is wrapped in a KettleXMLException with the localized message key GPBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML. The step definition could not be loaded from the .ktr file.","triggerScenarios":"loadXML calls readData and the XML node is malformed or missing expected child elements/attributes (fields, field names, date masks), throwing inside the try block.","commonSituations":"Hand-edited or truncated .ktr files; XML produced by a different plugin version with a changed schema; copy-pasted step XML missing the <fields> subtree; encoding corruption.","solutions":["Open the .ktr in a text editor and inspect/repair the XML under this step's node (fields, field_name, stream_name, date_mask attributes)","Recreate the step in Spoon: add a fresh PGBulkLoader step and reconfigure it, replacing the corrupted one","Check whether the file was produced by an incompatible plugin version and migrate the XML accordingly","Validate the whole .ktr is well-formed XML (xmllint) before re-importing"],"exampleFix":"<!-- before (missing fields node) -->\n<step name=\"PG bulk load\" type=\"PGBulkLoader\"/>\n<!-- after -->\n<step name=\"PG bulk load\" type=\"PGBulkLoader\">\n  <fields>\n    <field stream_name=\"id\" field_name=\"id\" date_mask=\"\"/>\n  </fields>\n</step>","handlingStrategy":"validation","validationCode":"// validate the ktr XML before import\nDocument doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse( new File( \"trans.ktr\" ) );\nif ( doc.getElementsByTagName( \"PGBulkLoader\" ).getLength() == 0\n  || doc.getElementsByTagName( \"fields\" ).getLength() == 0 ) {\n  throw new IllegalStateException( \"PGBulkLoader step XML missing required <fields> section\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  transMeta.loadXml( inputStream );\n} catch ( KettleXMLException e ) {\n  if ( e.getMessage().contains( \"UnableToReadStepInfoFromXML\" ) ) {\n    // inspect the .ktr step node and rebuild the step in Spoon\n  }\n}","preventionTips":["Never hand-edit .ktr XML without validating against the schema","Validate exported XML with xmllint before importing","Recreate suspect steps in Spoon rather than patching XML by hand","Pin compatible Pentaho/plugin versions when sharing transformations"],"tags":["kettle","xml","metadata","parse"],"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"}