{"record":{"id":"3fb73627bd256164","repo":"pentaho/pentaho-kettle","slug":"monetdbbulkloadermeta-exception-unabletoreadstepinfofromxml","errorCode":"MonetDBBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML","errorMessage":"MonetDBBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML","messagePattern":"MonetDBBulkLoaderMeta\\.Exception\\.UnableToReadStepInfoFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java","lineNumber":346,"sourceCode":"      // Old functionality. Always commented out. It may be safe to remove all of th\n      // autoSchema = \"Y\".equals(XMLHandler.getTagValue(stepnode, \"auto_schema\"));\n      // autoStringWidths = \"Y\".equals(XMLHandler.getTagValue(stepnode, \"auto_string_widths\"));\n\n      int nrvalues = XMLHandler.countNodes( stepnode, \"mapping\" );\n      allocate( nrvalues );\n\n      for ( int i = 0; i < nrvalues; i++ ) {\n        Node vnode = XMLHandler.getSubNodeByNr( stepnode, \"mapping\", i );\n\n        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        fieldFormatOk[i] = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( vnode, \"field_format_ok\" ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n          PKG, \"MonetDBBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML\" ), e );\n    }\n  }\n\n  public void setDefault() {\n    fieldTable = null;\n    databaseMeta = null;\n    schemaName = \"\";\n    tableName = BaseMessages.getString( PKG, \"MonetDBBulkLoaderMeta.DefaultTableName\" );\n    bufferSize = \"100000\";\n    logFile = \"\";\n    truncate = false;\n    fullyQuoteSQL = true;\n\n    // MonetDB safe defaults.\n    fieldSeparator = \"|\";\n    fieldEnclosure = \"\\\"\";\n    NULLrepresentation = \"\";","sourceCodeStart":328,"sourceCodeEnd":364,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/monet-db-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/monetdbbulkloader/MonetDBBulkLoaderMeta.java#L328-L364","documentation":"readData() - called by loadXML() when deserializing the step from a transformation file - wraps any Exception encountered while parsing the step's XML nodes into a KettleXMLException whose message is the resource key MonetDBBulkLoaderMeta.Exception.UnableToReadStepInfoFromXML. It means the step's XML fragment could not be converted back into field definitions.","triggerScenarios":"XMLHandler.getTagValue() or the field-parsing loop throws (e.g. NumberFormatException from parseInt/parse of attributes, missing/malformed 'fields' node, null vnode) while reading fieldTable/fieldStream entries from the saved step XML.","commonSituations":"Transformation file edited by hand or corrupted; the .ktr was written by a different Pentaho/Kettle version whose step XML layout changed; truncated or invalid XML for the <fields> section.","solutions":["Open the .ktr in Spoon and inspect the step's XML (right-click > Edit) for malformed <fields> entries","Check the wrapped cause for the exact parse failure (e.g. NumberFormatException naming the bad attribute)","Restore the step from a backup or re-add and reconfigure the step in the transformation","Ensure the file was saved by the same/major-compatible Kettle version"],"exampleFix":"// before: hand-edited field node missing numeric attribute\n<field><name>col1</name></field>\n// after: regenerate via Spoon so required attributes are present\n<field><name>col1</name><field_table>col1</field_table><field_stream>col1</field_stream><field_format_ok>Y</field_format_ok></field>","handlingStrategy":"try-catch","validationCode":"// validate the step XML before loadXML\nNode stepNode = XMLHandler.getSubNode( transformNode, \"fields\" );\nif ( stepNode == null ) throw new KettleXMLException( \"Missing <fields> section\" );\n// and verify numeric attributes parse before readData","typeGuard":"boolean validStepXml( Node n ) { return n != null && XMLHandler.getSubNode( n, \"fields\" ) != null; }","tryCatchPattern":"try { meta.loadXML( stepNode, databases, metaStore, variables ); } catch ( KettleXMLException e ) { log.error( \"Cannot read MonetDB bulk loader step from XML\", e.getCause() ); restore from backup or reconfigure step; }","preventionTips":["Don't hand-edit .ktr step XML; let Spoon generate it","Keep the authoring and executing Kettle versions compatible","Version-control transformations so corrupted files can be restored","Validate XML files (e.g. with xmllint) before deploying them"],"tags":["xml","serialization","parsing","kettle"],"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"}