{"record":{"id":"3c5b8dc98b172430","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-step-info-from-xml-s3csvinputmeta","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/s3csvinput/core/src/main/java/org/pentaho/di/trans/steps/s3csvinput/S3CsvInputMeta.java","lineNumber":186,"sourceCode":"      allocate( nrfields );\n\n      for ( int i = 0; i < nrfields; i++ ) {\n        inputFields[i] = new TextFileInputField();\n\n        Node fnode = XMLHandler.getSubNodeByNr( fields, \"field\", i );\n\n        inputFields[i].setName( XMLHandler.getTagValue( fnode, \"name\" ) );\n        inputFields[i].setType( ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( fnode, \"type\" ) ) );\n        inputFields[i].setFormat( XMLHandler.getTagValue( fnode, \"format\" ) );\n        inputFields[i].setCurrencySymbol( XMLHandler.getTagValue( fnode, \"currency\" ) );\n        inputFields[i].setDecimalSymbol( XMLHandler.getTagValue( fnode, \"decimal\" ) );\n        inputFields[i].setGroupSymbol( XMLHandler.getTagValue( fnode, \"group\" ) );\n        inputFields[i].setLength( Const.toInt( XMLHandler.getTagValue( fnode, \"length\" ), -1 ) );\n        inputFields[i].setPrecision( Const.toInt( XMLHandler.getTagValue( fnode, \"precision\" ), -1 ) );\n        inputFields[i].setTrimType( ValueMetaString.getTrimTypeByCode( XMLHandler.getTagValue( fnode, \"trim_type\" ) ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to load step info from XML\", e );\n    }\n  }\n\n  public void allocate( int nrFields ) {\n    inputFields = new TextFileInputField[nrFields];\n  }\n\n  @Override\n  public String getXML() {\n    StringBuffer retval = new StringBuffer( 500 );\n\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"aws_access_key\", Encr.encryptPasswordIfNotUsingVariables(\n        awsAccessKey ) ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"aws_secret_key\", Encr.encryptPasswordIfNotUsingVariables(\n        awsSecretKey ) ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"bucket\", bucket ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"filename\", filename ) );\n    retval.append( \"    \" ).append( XMLHandler.addTagValue( \"filename_field\", filenameField ) );","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/s3csvinput/core/src/main/java/org/pentaho/di/trans/steps/s3csvinput/S3CsvInputMeta.java#L168-L204","documentation":"S3CsvInputMeta.readData parses the step's XML definition (fields, delimiter, encoding, etc.) when a transformation is loaded. Any exception while reading XML tags is wrapped in a KettleXMLException 'Unable to load step info from XML'.","triggerScenarios":"Loading a .ktr whose S3 CSV Input XML node is malformed or missing expected tags (fields, trim_type, format, etc.) — XMLHandler.getTagValue or field parsing throws.","commonSituations":"Hand-edited or truncated .ktr files; transformation produced by a newer/older Pentaho version with a changed XML schema; corrupted export; copy-paste of step XML with wrong node structure.","solutions":["Open the .ktr in Spoon and re-save the S3 CSV Input step to regenerate valid XML","Compare the step XML against a working transformation to find missing/renamed tags","Read the wrapped cause to identify which tag failed","Migrate the transformation through a compatible Pentaho version if schemas differ"],"exampleFix":"// before (broken ktr snippet)\n<trim_type>non</trim_typ>\n// after\n<trim_type>none</trim_type>","handlingStrategy":"try-catch","validationCode":"if ( stepnode == null || XMLHandler.getTagValue( stepnode, \"fields\" ) == null ) {\n  throw new IllegalArgumentException( \"missing S3CsvInput XML node\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  loadXML( stepnode, databases, metaStore );\n} catch ( KettleXMLException e ) {\n  logError( \"Corrupt S3 CSV Input XML: \" + e.getCause() );\n  throw e;\n}","preventionTips":["Never hand-edit .ktr files; edit via Spoon","Keep Pentaho and plugin versions consistent across environments","Keep backups of transformations before migration","Validate exported XML loads before deleting originals"],"tags":["kettle","xml","serialization","metadata"],"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"}