{"record":{"id":"2fc5fe3ae4ab121f","repo":"pentaho/pentaho-kettle","slug":"jobmeta-exception-unabletoloadjobfromxmlnode","errorCode":null,"errorMessage":"JobMeta.Exception.UnableToLoadJobFromXMLNode","messagePattern":"JobMeta\\.Exception\\.UnableToLoadJobFromXMLNode","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/JobMeta.java","lineNumber":1340,"sourceCode":"\n      // Read the notes...\n      Node notepadsnode = XMLHandler.getSubNode( jobnode, \"notepads\" );\n      int nrnotes = XMLHandler.countNodes( notepadsnode, \"notepad\" );\n      for ( int i = 0; i < nrnotes; i++ ) {\n        Node notepadnode = XMLHandler.getSubNodeByNr( notepadsnode, \"notepad\", i );\n        NotePadMeta ni = new NotePadMeta( notepadnode );\n        notes.add( ni );\n      }\n\n      // Load the attribute groups map\n      //\n      attributesMap = AttributesUtil.loadAttributes( XMLHandler.getSubNode( jobnode, AttributesUtil.XML_TAG ) );\n\n      ExtensionPointHandler.callExtensionPoint( LogChannel.GENERAL, KettleExtensionPoint.JobMetaLoaded.id, this );\n\n      clearChanged();\n    } catch ( Exception e ) {\n      throw new KettleXMLException( BaseMessages.getString( PKG, \"JobMeta.Exception.UnableToLoadJobFromXMLNode\" ), e );\n    } finally {\n      setInternalKettleVariables();\n    }\n  }\n\n  /**\n   * Gets the job entry copy.\n   *\n   * @param x        the x\n   * @param y        the y\n   * @param iconsize the iconsize\n   * @return the job entry copy\n   */\n  public JobEntryCopy getJobEntryCopy( int x, int y, int iconsize ) {\n    int i, s;\n    s = nrJobEntries();\n    for ( i = s - 1; i >= 0; i-- ) {\n      // Back to front because drawing goes from start to end","sourceCodeStart":1322,"sourceCodeEnd":1358,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/JobMeta.java#L1322-L1358","documentation":"JobMeta.loadXML(Node jobnode, ...) throws this KettleXMLException when any exception occurs while populating a JobMeta from an already-obtained XML DOM node: bad sub-elements, failing AttributesUtil.loadAttributes, or a throwing JobMetaLoaded extension point. Unlike error 730 the failure is in interpreting the node, not reading the file, and the original exception is chained.","triggerScenarios":"Calling JobMeta.loadXML(Node jobnode, ...) with a node that is not a valid <job> element or whose children fail to parse; an extension point registered on KettleExtensionPoint.JobMetaLoaded throws; AttributesUtil.loadAttributes encounters malformed attributes XML.","commonSituations":"Parsing a job from an embedded XML string where the wrong sub-node was selected; a plugin's extension point crashing during job load; hand-built or edited job XML missing required child elements (job entries, hops, attributes map).","solutions":["Confirm the Node passed in is the <job> root element, not a parent document or sibling node","Read the chained cause to find which element/extension point failed","Disable or fix any JobMetaLoaded extension point plugins and retry","Repair or re-export the job XML so all required sub-nodes (entries, hops, attributes) are present"],"exampleFix":"// before\nNode jobNode = XMLHandler.getSubNode(doc, \"wrong-tag\");\njobMeta.loadXML(jobNode, null, null, metaStore, null, null);\n// after\nNode jobNode = XMLHandler.getSubNode(doc, XMLHandler.XML_TAG_JOB); // ensure the real <job> node\njobMeta.loadXML(jobNode, null, null, metaStore, null, null);","handlingStrategy":"try-catch","validationCode":"Node jobNode = XMLHandler.getSubNode(doc, \"job\");\nif (jobNode == null) throw new IllegalArgumentException(\"XML document has no <job> root node\");","typeGuard":null,"tryCatchPattern":"try {\n  jobMeta.loadXML(jobnode, fname, rep, metaStore, prompter, null);\n} catch (KettleXMLException e) {\n  log.error(\"Job node could not be loaded: \" + e.getCause(), e);\n}","preventionTips":["Always pass the exact <job> element, never the Document node","Audit JobMetaLoaded extension-point plugins for throwing code paths","Re-export jobs from Spoon rather than hand-editing XML"],"tags":["xml","job-meta","kettle","dom-parsing"],"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"}