{"record":{"id":"b3431bbe3cfe8278","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-http-from-xml-node","errorCode":null,"errorMessage":"Unable to load job entry of type 'HTTP' from XML node","messagePattern":"Unable to load job entry of type 'HTTP' from XML node","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/http/JobEntryHTTP.java","lineNumber":272,"sourceCode":"      password = Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue( entrynode, TAG_PASSWORD ) );\n\n      proxyHostname = XMLHandler.getTagValue( entrynode, TAG_PROXY_HOST );\n      proxyPort = XMLHandler.getTagValue( entrynode, TAG_PROXY_PORT );\n      nonProxyHosts = XMLHandler.getTagValue( entrynode, TAG_NON_PROXY_HOSTS );\n      addfilenameresult =\n        \"Y\".equalsIgnoreCase( Const.NVL( XMLHandler.getTagValue( entrynode, TAG_ADD_FILENAME_RESULT ), \"Y\" ) );\n      Node headers = XMLHandler.getSubNode( entrynode, TAG_HEADERS );\n\n      // How many field headerName?\n      int nrHeaders = XMLHandler.countNodes( headers, TAG_HEADER );\n      allocate( nrHeaders );\n      for ( int i = 0; i < nrHeaders; i++ ) {\n        Node fnode = XMLHandler.getSubNodeByNr( headers, TAG_HEADER, i );\n        headerName[ i ] = XMLHandler.getTagValue( fnode, TAG_HEADER_NAME );\n        headerValue[ i ] = XMLHandler.getTagValue( fnode, TAG_HEADER_VALUE );\n      }\n    } catch ( KettleXMLException xe ) {\n      throw new KettleXMLException( \"Unable to load job entry of type 'HTTP' from XML node\", xe );\n    }\n  }\n\n  @Override\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId idJobEntry, List<DatabaseMeta> databases,\n                       List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      url = rep.getJobEntryAttributeString( idJobEntry, TAG_URL );\n      targetFilename = rep.getJobEntryAttributeString( idJobEntry, TAG_TARGET_FILENAME );\n      fileAppended = rep.getJobEntryAttributeBoolean( idJobEntry, TAG_FILE_APPENDED );\n      dateTimeAdded = rep.getJobEntryAttributeBoolean( idJobEntry, TAG_DATE_TIME_ADDED );\n      targetFilenameExtension = Const.NVL( rep.getJobEntryAttributeString( idJobEntry, TAG_TARGET_FILENAME_EXTENSION ),\n        rep.getJobEntryAttributeString( idJobEntry, TAG_TARGET_FILENAME_EXTENTION ) );\n\n      uploadFilename = rep.getJobEntryAttributeString( idJobEntry, TAG_UPLOAD_FILENAME );\n\n      urlFieldname = rep.getJobEntryAttributeString( idJobEntry, TAG_URL_FIELDNAME );\n      uploadFieldname = rep.getJobEntryAttributeString( idJobEntry, TAG_UPLOAD_FIELDNAME );","sourceCodeStart":254,"sourceCodeEnd":290,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/http/JobEntryHTTP.java#L254-L290","documentation":"Thrown by JobEntryHTTP.loadXML when parsing the HTTP job entry's XML node (URL, arguments, headers, etc.) fails with a KettleXMLException. The cause is chained. It means the 'HTTP' job entry could not be loaded from a .kjb XML document.","triggerScenarios":"Calling loadXML on JobEntryHTTP when XMLHandler navigation (getSubNode, getSubNodeByNr on <headers>/<header> nodes) throws KettleXMLException — malformed XML or missing/invalid node structure inside the entry block.","commonSituations":"Hand-edited or truncated .kjb files; header nodes removed or renamed manually; version drift between the file's schema and the current Pentaho version; bad encoding after editing on another platform.","solutions":["Validate and fix the XML of the HTTP entry node; ensure <headers><header><name/><value/></header></headers> structure is intact.","Check the chained KettleXMLException message for the precise parse failure.","Re-export the job from Spoon to produce a well-formed file.","If migrating versions, re-create the HTTP entry in the new Spoon version."],"exampleFix":"// before: malformed header node\n<headers><header><name>Auth</name></headers>\n// after\n<headers>\n  <header>\n    <name>Authorization</name>\n    <value>Bearer token</value>\n  </header>\n</headers>","handlingStrategy":"validation","validationCode":"Document doc = XMLHandler.loadXMLFile(inputStream);\nif (doc == null) throw new KettleException(\"Malformed .kjb file\");\nNode entry = XMLHandler.getSubNode(doc, \"entry\");\nif (XMLHandler.getSubNode(entry, \"headers\") == null) {\n  logBasic(\"HTTP entry has no headers block; defaults will apply\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadXML(entryNode, databases, slaveServers, rep, metaStore);\n} catch (KettleXMLException e) {\n  logError(\"HTTP entry XML load failed: \" + e.getMessage());\n  // repair the node or re-export from Spoon\n}","preventionTips":["Keep the <headers><header><name/><value/></header></headers> structure intact.","Validate .kjb XML after any scripted manipulation.","Avoid editing job files outside Spoon.","Match Pentaho versions between file creation and loading."],"tags":["kettle","xml","job-entry","http","parsing"],"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"}