{"record":{"id":"84b5e39755b55db7","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-ping-from-xml-node","errorCode":null,"errorMessage":"Unable to load job entry of type 'ping' from XML node","messagePattern":"Unable to load job entry of type 'ping' from XML node","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/ping/JobEntryPing.java","lineNumber":141,"sourceCode":"        nbrPackets = nbrPaquets;\n      }\n      timeout = XMLHandler.getTagValue( entrynode, \"timeout\" );\n      pingtype = XMLHandler.getTagValue( entrynode, \"pingtype\" );\n      if ( Utils.isEmpty( pingtype ) ) {\n        pingtype = classicPing;\n        ipingtype = iclassicPing;\n      } else {\n        if ( pingtype.equals( systemPing ) ) {\n          ipingtype = isystemPing;\n        } else if ( pingtype.equals( bothPings ) ) {\n          ipingtype = ibothPings;\n        } else {\n          ipingtype = iclassicPing;\n        }\n\n      }\n    } catch ( KettleXMLException xe ) {\n      throw new KettleXMLException( \"Unable to load job entry of type 'ping' from XML node\", xe );\n    }\n  }\n\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      hostname = rep.getJobEntryAttributeString( id_jobentry, \"hostname\" );\n      nbrPackets = rep.getJobEntryAttributeString( id_jobentry, \"nbr_packets\" );\n\n      // TODO: The following lines may be removed 3 versions after 2.5.0\n      String nbrPaquets = rep.getJobEntryAttributeString( id_jobentry, \"nbrpaquets\" );\n      if ( nbrPackets == null && nbrPaquets != null ) {\n        // if only nbrpaquets exists this means that the file was\n        // save by a version 2.5.0 ping job entry\n        nbrPackets = nbrPaquets;\n      }\n      timeout = rep.getJobEntryAttributeString( id_jobentry, \"timeout\" );\n","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/ping/JobEntryPing.java#L123-L159","documentation":"JobEntryPing.loadXML wraps any KettleXMLException thrown while parsing the 'ping' job entry's XML node (hostname, timeout, nbrpaquets, pingtype, etc.) into a KettleXMLException with the fixed message 'Unable to load job entry of type ping from XML node'. The parse error is the cause. It means the ping entry's XML could not be deserialized.","triggerScenarios":"Loading a .kjb job file whose <entry type='PING'> node causes XMLHandler.getTagValue/attribute parsing to throw KettleXMLException — malformed XML or an invalid nested element in the ping entry block.","commonSituations":"Hand-edited .kjb with broken tags inside the ping entry; truncated download of the job file; XML from an incompatible Pentaho version.","solutions":["Validate the .kjb XML and repair the malformed ping entry node","Restore the job file from backup/version control","Recreate the Ping job entry in Spoon and re-save the job"],"exampleFix":"// before\nJobMeta job = new JobMeta(inputStream, null, null); // fails on malformed ping node\n// after\ntry {\n  job = new JobMeta(inputStream, null, null);\n} catch (KettleXMLException e) {\n  logError(\"Bad XML in ping job entry: \" + e.getCause(), e);\n  // open backup copy or fix the .kjb file\n}","handlingStrategy":"try-catch","validationCode":"Document doc = XMLHandler.loadXMLFile(kjbFile);\nif (doc == null) throw new KettleException(\"Invalid job XML: \" + kjbFile);","typeGuard":null,"tryCatchPattern":"try {\n  jobMeta = new JobMeta(inputStream, null, null);\n} catch (KettleXMLException e) {\n  logError(\"Ping entry XML invalid: \" + e.getCause(), e);\n  // restore backup or fix the ping entry node\n}","preventionTips":["Edit jobs only in Spoon, not in a text editor","Validate .kjb files after external generation or transformation","Keep backups/version history of job files"],"tags":["xml","parsing","job-entry","kettle"],"backgroundTag":"xml-parse-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"}