{"record":{"id":"b978c5659d036a8d","repo":"pentaho/pentaho-kettle","slug":"jobexecutormeta-exception","errorCode":"JobExecutorMeta.Exception.ErrorLoadingJobExecutorDetailsFromXML","errorMessage":"JobExecutorMeta.Exception.ErrorLoadingJobExecutorDetailsFromXML","messagePattern":"JobExecutorMeta\\.Exception\\.ErrorLoadingJobExecutorDetailsFromXML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/jobexecutor/JobExecutorMeta.java","lineNumber":339,"sourceCode":"      resultRowsField = new String[nrFields];\n      resultRowsType = new int[nrFields];\n      resultRowsLength = new int[nrFields];\n      resultRowsPrecision = new int[nrFields];\n\n      for ( int i = 0; i < nrFields; i++ ) {\n\n        Node fieldNode = XMLHandler.getSubNodeByNr( stepnode, \"result_rows_field\", i );\n\n        resultRowsField[i] = XMLHandler.getTagValue( fieldNode, \"name\" );\n        resultRowsType[i] = ValueMetaFactory.getIdForValueMeta( XMLHandler.getTagValue( fieldNode, \"type\" ) );\n        resultRowsLength[i] = Const.toInt( XMLHandler.getTagValue( fieldNode, \"length\" ), -1 );\n        resultRowsPrecision[i] = Const.toInt( XMLHandler.getTagValue( fieldNode, \"precision\" ), -1 );\n      }\n\n      resultFilesTargetStep = XMLHandler.getTagValue( stepnode, \"result_files_target_step\" );\n      resultFilesFileNameField = XMLHandler.getTagValue( stepnode, \"result_files_file_name_field\" );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString(\n        PKG, \"JobExecutorMeta.Exception.ErrorLoadingJobExecutorDetailsFromXML\" ), e );\n    }\n  }\n\n  @Override\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n    String method = rep.getStepAttributeString( id_step, \"specification_method\" );\n    specificationMethod = ObjectLocationSpecificationMethod.getSpecificationMethodByCode( method );\n    String jobId = rep.getStepAttributeString( id_step, \"job_object_id\" );\n    jobObjectId = Utils.isEmpty( jobId ) ? null : new StringObjectId( jobId );\n    jobName = rep.getStepAttributeString( id_step, \"job_name\" );\n    fileName = rep.getStepAttributeString( id_step, \"filename\" );\n    directoryPath = rep.getStepAttributeString( id_step, \"directory_path\" );\n\n    groupSize = rep.getStepAttributeString( id_step, \"group_size\" );\n    groupField = rep.getStepAttributeString( id_step, \"group_field\" );\n    groupTime = rep.getStepAttributeString( id_step, \"group_time\" );\n","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/jobexecutor/JobExecutorMeta.java#L321-L357","documentation":"Thrown by JobExecutorMeta.loadXML when deserializing the step's metadata from a .ktr XML file: any Exception raised while parsing the step's XML node (result rows fields, result files settings, group field, etc.) is wrapped in a KettleXMLException with this generic message. The underlying parse failure is the cause.","triggerScenarios":"Loading a transformation whose JobExecutor step XML node is malformed or contains values that fail conversion (e.g. Const.toInt on a non-numeric 'length'/'precision' tag is tolerated, but structural XML errors, missing nodes, or invalid XML overall throw here).","commonSituations":"Hand-edited .ktr files; transformations generated by scripts or third-party tools with wrong tag structure; XML truncated/corrupted during transfer; opening a file saved by a much newer Pentaho version with schema changes; repository import of damaged XML.","solutions":["Open the .ktr in a text editor and inspect the JobExecutor step's XML node for malformed or truncated tags; fix or restore from backup/Version History","Check the 'Caused by' of the KettleXMLException to locate the exact tag that failed to parse","Recreate the JobExecutor step in Spoon and reconfigure it instead of repairing the XML manually","Regenerate or re-export the transformation from the source system to get valid XML"],"exampleFix":"// before (hand-edited XML, broken tag)\n<result_rows_field>\n  <name>amount</name>\n  <type>Number</type\n</result_rows_field>   <!-- unclosed type tag -->\n// after\n<result_rows_field>\n  <name>amount</name>\n  <type>Number</type>\n</result_rows_field>","handlingStrategy":"try-catch","validationCode":"// Validate the .ktr XML parses and contains the JobExecutor step node before loading\nDocument doc = XMLHandler.loadXMLFile(ktrFile);\nNode stepnode = XMLHandler.getSubNode(\n  XMLHandler.getSubNode(doc, \"transformation\"), \"step\");\nif ( stepnode == null ) throw new IllegalStateException(\"Invalid or missing step XML in \" + ktrFile);","typeGuard":"boolean isLoadableKtr(File ktrFile) {\n  try {\n    Document doc = XMLHandler.loadXMLFile(ktrFile);\n    return doc != null && XMLHandler.getSubNode(doc, \"transformation\") != null;\n  } catch ( Exception e ) { return false; }\n}","tryCatchPattern":"try {\n  transMeta = new TransMeta(ktrFile, metaStore);\n} catch ( KettleXMLException e ) {\n  logError(\"Failed loading JobExecutor step details from XML: \" + e.getMessage());\n  // inspect e.getCause() for the exact XML parse failure, then restore/recreate the step\n  Throwable cause = e.getCause();\n  if ( cause != null ) logError(\"Underlying XML error: \" + cause.getMessage());\n}","preventionTips":["Never hand-edit .ktr XML; edit steps through Spoon and keep files in version control","Keep Pentaho versions consistent between authoring and execution environments","Validate exported/generated transformations by loading them in a test harness before production use","Keep backups or use repository version history so corrupted XML can be restored"],"tags":["pentaho-kettle","xml","metadata-loading","corrupt-file"],"backgroundTag":"json-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"}