pentaho/pentaho-kettle · error · KettleXMLException
Unable to load job entry of type 'SNMPTrap' from XML node
Error message
Unable to load job entry of type 'SNMPTrap' from XML node
What it means
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.
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.
Defensive patterns
Strategy: validation
Validate before calling
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.newDocumentBuilder().parse(new File("job.kjb")); // fail fast on malformed XML Try / catch
try {
entry.loadXML(entryNode, databases, slaveServers, rep, metaStore);
} catch (KettleXMLException e) {
logger.error("SNMPTrap entry XML corrupt: " + e.getMessage(), e);
// skip or recreate entry
} Prevention
- 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.
When it happens
Trigger: Loading a .kjb file whose <entry> node for type SNMPTrap contains invalid XML (unescaped characters, wrong nesting) or when XMLHandler throws while reading tags.
Common situations: Job file hand-edited or truncated; file transferred with encoding corruption; XML produced by a different/newer Pentaho version with changed tag structure.
Understand the failure class
Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.
Related errors
- ERROR_0001
- JobDosToUnix.Error.Exception.UnableLoadXML
- JobEntryDeleteFolders.UnableToLoadFromXml
- JobEntryDeleteResultFilenames.CanNotLoadFromXML
- JobEntrySimple.Error.Exception.UnableLoadXML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/ad5a99a28eab6514.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/snmptrap/JobEntrySNMPTrap.java:183
public void loadXML( Node entrynode, List<DatabaseMeta> databases, List<SlaveServer> slaveServers,
Repository rep, IMetaStore metaStore ) throws KettleXMLException {
try {
super.loadXML( entrynode, databases, slaveServers );
port = XMLHandler.getTagValue( entrynode, "port" );
serverName = XMLHandler.getTagValue( entrynode, "servername" );
oid = XMLHandler.getTagValue( entrynode, "oid" );
message = XMLHandler.getTagValue( entrynode, "message" );
comString = XMLHandler.getTagValue( entrynode, "comstring" );
timeout = XMLHandler.getTagValue( entrynode, "timeout" );
nrretry = XMLHandler.getTagValue( entrynode, "nrretry" );
targettype = XMLHandler.getTagValue( entrynode, "targettype" );
user = XMLHandler.getTagValue( entrynode, "user" );
passphrase = Encr.decryptPasswordOptionallyEncrypted( XMLHandler.getTagValue( entrynode, "passphrase" ) );
engineid = XMLHandler.getTagValue( entrynode, "engineid" );
} catch ( KettleXMLException xe ) {
throw new KettleXMLException( "Unable to load job entry of type 'SNMPTrap' from XML node", xe );
}
}
public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
List<SlaveServer> slaveServers ) throws KettleException {
try {
port = rep.getJobEntryAttributeString( id_jobentry, "port" );
serverName = rep.getJobEntryAttributeString( id_jobentry, "servername" );
oid = rep.getJobEntryAttributeString( id_jobentry, "oid" );
message = rep.getJobEntryAttributeString( id_jobentry, "message" );
comString = rep.getJobEntryAttributeString( id_jobentry, "comstring" );
timeout = rep.getJobEntryAttributeString( id_jobentry, "timeout" );
nrretry = rep.getJobEntryAttributeString( id_jobentry, "nrretry" );
targettype = rep.getJobEntryAttributeString( id_jobentry, "targettype" );
user = rep.getJobEntryAttributeString( id_jobentry, "user" );
passphrase = Encr.decryptPasswordOptionallyEncrypted( rep.getJobEntryAttributeString( id_jobentry, "passphrase" ) );
engineid = rep.getJobEntryAttributeString( id_jobentry, "engineid" );
View on GitHub (pinned to f3058517a1)