{"record":{"id":"ad5a99a28eab6514","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-snmptrap-from-xml-node","errorCode":null,"errorMessage":"Unable to load job entry of type 'SNMPTrap' from XML node","messagePattern":"Unable to load job entry of type 'SNMPTrap' from XML node","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/snmptrap/JobEntrySNMPTrap.java","lineNumber":183,"sourceCode":"\n  public void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,\n    Repository rep, IMetaStore metaStore ) throws KettleXMLException {\n    try {\n      super.loadXML( entrynode, databases, slaveServers );\n      port = XMLHandler.getTagValue( entrynode, \"port\" );\n      serverName = XMLHandler.getTagValue( entrynode, \"servername\" );\n      oid = XMLHandler.getTagValue( entrynode, \"oid\" );\n      message = XMLHandler.getTagValue( entrynode, \"message\" );\n      comString = XMLHandler.getTagValue( entrynode, \"comstring\" );\n      timeout = XMLHandler.getTagValue( entrynode, \"timeout\" );\n      nrretry = XMLHandler.getTagValue( entrynode, \"nrretry\" );\n      targettype = XMLHandler.getTagValue( entrynode, \"targettype\" );\n      user = XMLHandler.getTagValue( entrynode, \"user\" );\n      passphrase = Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue( entrynode, \"passphrase\" ) );\n      engineid = XMLHandler.getTagValue( entrynode, \"engineid\" );\n\n    } catch ( KettleXMLException xe ) {\n      throw new KettleXMLException( \"Unable to load job entry of type 'SNMPTrap' 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      port = rep.getJobEntryAttributeString( id_jobentry, \"port\" );\n      serverName = rep.getJobEntryAttributeString( id_jobentry, \"servername\" );\n      oid = rep.getJobEntryAttributeString( id_jobentry, \"oid\" );\n      message = rep.getJobEntryAttributeString( id_jobentry, \"message\" );\n      comString = rep.getJobEntryAttributeString( id_jobentry, \"comstring\" );\n      timeout = rep.getJobEntryAttributeString( id_jobentry, \"timeout\" );\n      nrretry = rep.getJobEntryAttributeString( id_jobentry, \"nrretry\" );\n      targettype = rep.getJobEntryAttributeString( id_jobentry, \"targettype\" );\n      user = rep.getJobEntryAttributeString( id_jobentry, \"user\" );\n      passphrase = Encr.decryptPasswordOptionallyEncrypted( rep.getJobEntryAttributeString( id_jobentry, \"passphrase\" ) );\n      engineid = rep.getJobEntryAttributeString( id_jobentry, \"engineid\" );\n","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/snmptrap/JobEntrySNMPTrap.java#L165-L201","documentation":"JobEntrySNMPTrap.loadXML wraps any KettleXMLException raised while parsing the SNMPTrap job entry's XML tags ('servername', 'port', 'community', 'targettype', 'user', 'passphrase', 'engineid', etc.) and rethrows with 'Unable to load job entry of type SNMPTrap from XML node'. It means the XML representation of this job entry is malformed or unreadable.","triggerScenarios":"Loading a .kjb file whose <entry> node for type SNMPTrap contains invalid XML (unescaped characters, wrong nesting) or when XMLHandler throws while reading tags.","commonSituations":"Job file hand-edited or truncated; file transferred with encoding corruption; XML produced by a different/newer Pentaho version with changed tag structure.","solutions":["Open the .kjb in a text editor and validate the SNMPTrap entry's XML block for well-formedness.","Restore the job file from backup or version control.","Recreate the SNMPTrap job entry in Spoon and re-save the job.","Check that the file encoding is correct (UTF-8) and special characters are escaped."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\ndbf.newDocumentBuilder().parse(new File(\"job.kjb\")); // fail fast on malformed XML","typeGuard":null,"tryCatchPattern":"try {\n  entry.loadXML(entryNode, databases, slaveServers, rep, metaStore);\n} catch (KettleXMLException e) {\n  logger.error(\"SNMPTrap entry XML corrupt: \" + e.getMessage(), e);\n  // skip or recreate entry\n}","preventionTips":["Do not hand-edit .kjb files; edit in Spoon.","Validate XML well-formedness after any external modification.","Transfer job files in binary mode to avoid corruption.","Keep backups of job files in version control."],"tags":["kettle","xml","parsing","job-entry"],"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"}