{"record":{"id":"e27c241861eb6546","repo":"pentaho/pentaho-kettle","slug":"pentahoreportingoutputmeta-exception-unabletoloadstepinfo","errorCode":null,"errorMessage":"PentahoReportingOutputMeta.Exception.UnableToLoadStepInfo","messagePattern":"PentahoReportingOutputMeta\\.Exception\\.UnableToLoadStepInfo","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"plugins/pentaho-reporting/impl/src/main/java/org/pentaho/di/trans/steps/pentahoreporting/PentahoReportingOutputMeta.java","lineNumber":181,"sourceCode":"      outputFile = XMLHandler.getTagValue( stepnode, XML_TAG_OUTPUT_FILE );\n      useValuesFromFields = \"Y\".equals( XMLHandler.getTagValue( stepnode, XML_TAG_USE_VALUES_FROM_FIELDS ) )\n        || XMLHandler.getTagValue( stepnode, XML_TAG_USE_VALUES_FROM_FIELDS )  == null;\n      createParentFolder = \"Y\".equals( XMLHandler.getTagValue( stepnode, XML_TAG_CREATE_PARENT_FOLDER ) );\n      parameterFieldMap = new HashMap<String, String>();\n      Node parsNode = XMLHandler.getSubNode( stepnode, XML_TAG_PARAMETERS );\n      List<Node> nodes = XMLHandler.getNodes( parsNode, XML_TAG_PARAMETER );\n      for ( Node node : nodes ) {\n        String parameter = XMLHandler.getTagValue( node, XML_TAG_NAME );\n        String fieldname = XMLHandler.getTagValue( node, XML_TAG_FIELD );\n        if ( !Utils.isEmpty( parameter ) && !Utils.isEmpty( fieldname ) ) {\n          parameterFieldMap.put( parameter, fieldname );\n        }\n      }\n\n      outputProcessorType =\n        ProcessorType.getProcessorTypeByCode( XMLHandler.getTagValue( stepnode, XML_TAG_PROCESSOR_TYPE ) );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"PentahoReportingOutputMeta.Exception.UnableToLoadStepInfo\" ), e );\n    }\n  }\n\n  public void setDefault() {\n    outputProcessorType = ProcessorType.PDF;\n    createParentFolder = false;\n    useValuesFromFields = true;\n  }\n\n  public String getXML() {\n    StringBuilder retval = new StringBuilder();\n\n    retval.append( \"  \" + XMLHandler.addTagValue( XML_TAG_INPUT_FILE_FIELD, inputFileField ) );\n    retval.append( \"  \" + XMLHandler.addTagValue( XML_TAG_OUTPUT_FILE_FIELD, outputFileField ) );\n    retval.append( \"  \" + XMLHandler.addTagValue( XML_TAG_CREATE_PARENT_FOLDER, createParentFolder ) );\n    retval.append( \"  \" + XMLHandler.addTagValue( XML_TAG_INPUT_FILE, inputFile ) );\n    retval.append( \"  \" + XMLHandler.addTagValue( XML_TAG_OUTPUT_FILE, outputFile ) );","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pentaho-reporting/impl/src/main/java/org/pentaho/di/trans/steps/pentahoreporting/PentahoReportingOutputMeta.java#L163-L199","documentation":"PentahoReportingOutputMeta.readRep... actually readData (used by loadXML) wraps any Exception while parsing the step's XML definition into a KettleXMLException with message PentahoReportingOutputMeta.Exception.UnableToLoadStepInfo. Thrown when the transformation .ktr cannot be deserialized for this step, e.g. malformed tags or an unparseable processor type code.","triggerScenarios":"loadXML calls readData(stepnode); XMLHandler.getTagValue returns unexpected content and ProcessorType.getProcessorTypeByCode or another parser call throws (e.g. null/unknown processor type code in the <processor_type> tag).","commonSituations":"Hand-edited or truncated .ktr file; transformation saved by a newer/older Pentaho version with a renamed or removed processor type code; XML corruption during repository export/import.","solutions":["Open the .ktr in a text editor and validate the PentahoReportingOutput step XML tags, especially the processor type element","Restore the transformation from version control or repository history","Open and re-save the transformation in Spoon of the matching Pentaho/Kettle version","Upgrade/align plugin and Pentaho Reporting versions so the processor type codes match"],"exampleFix":"// before (hand-edited ktr)\n<processor_type>PDF_DOC</processor_type>\n// after\n<processor_type>PDF</processor_type>","handlingStrategy":"try-catch","validationCode":"// validate step XML before load\nString code = XMLHandler.getTagValue( stepnode, \"processor_type\" );\nif ( code == null || ProcessorType.getProcessorTypeByCode( code ) == null ) {\n  throw new KettleXMLException( \"Unknown processor_type: \" + code );\n}","typeGuard":null,"tryCatchPattern":"try {\n  meta.loadXML( stepnode, databases, metaStore );\n} catch ( KettleXMLException e ) {\n  logError( \"Cannot load reporting step metadata: \" + e.getMessage(), e );\n  // restore default metadata or fail the transformation load\n}","preventionTips":["Do not hand-edit .ktr files; edit via Spoon","Keep transformations under version control for easy rollback","Use the same Kettle/plugin version to save and load transformations","Validate .ktr XML after repository import/export"],"tags":["kettle","xml","metadata"],"backgroundTag":"schema-validation-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"}