pentaho/pentaho-kettle · error · KettleXMLException
Unable to load job entry of type 'Mysql bulk load' from XML…
Error message
Unable to load job entry of type 'Mysql bulk load' from XML node
What it means
KettleXMLException thrown by JobEntryMysqlBulkLoad.loadXML() when parsing the XML node for a 'Mysql bulk load' job entry fails with a KettleException. It indicates the serialized XML for this entry is unreadable or its tags are missing/misnamed.
Solutions
- Verify and repair the <entry type='MYSQL_BULK_LOAD'> XML tags with correct names and values.
- Recreate the job entry in Spoon to regenerate valid XML.
- Add the named connection to the job's databases/shared connections.
- Use matching Kettle/Pentaho versions for producing and consuming the file.
Example fix
// before <prorityvalue>abc</prorityvalue> // after <prorityvalue>5</prorityvalue>
Defensive patterns
Strategy: try-catch
Validate before calling
// before load if ( entrynode == null ) throw new KettleXMLException( "null entry node for MYSQL_BULK_LOAD" ); if ( XMLHandler.getTagValue( entrynode, "connection" ) == null ) throw new KettleXMLException( "missing <connection> tag" );
Type guard
boolean ok = (entrynode != null && XMLHandler.getTagValue( entrynode, "localinfile" ) != null);
Try / catch
try { jobEntry.loadXML( entrynode, databases, metaStore ); } catch ( KettleXMLException e ) { logError( "Cannot parse MYSQL_BULK_LOAD XML: " + e.getMessage(), e ); } Prevention
- Avoid manual XML edits to .kjb files
- Align Pentaho/Kettle versions across environments
- Register shared connections used by the entry
- Validate the XML structure before loading
When it happens
Trigger: Loading a job from XML when reading tags (tablename, filename, localinfile, prorityvalue, connection, addfiletoresult) throws or DatabaseMeta.findDatabase cannot resolve the connection name against the supplied list.
Common situations: Corrupt or truncated .kjb; cross-version file incompatibility; connection referenced in XML missing from shared connections.
Related errors
- Unable to load job entry of type 'table exists' from XML…
- JobEntryAbort.UnableToLoadFromXml.Label
- JobEntryAddResultFilenames.UnableToLoadFromXml
- JobEntryCheckFilesLocked.UnableToLoadFromXml
- JobEntryColumnsExist.Meta.UnableLoadXml
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/bb7279fa52a8f41e.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/mysqlbulkload/JobEntryMysqlBulkLoad.java:158
schemaname = XMLHandler.getTagValue( entrynode, "schemaname" );
tablename = XMLHandler.getTagValue( entrynode, "tablename" );
filename = XMLHandler.getTagValue( entrynode, "filename" );
separator = XMLHandler.getTagValue( entrynode, "separator" );
enclosed = XMLHandler.getTagValue( entrynode, "enclosed" );
escaped = XMLHandler.getTagValue( entrynode, "escaped" );
linestarted = XMLHandler.getTagValue( entrynode, "linestarted" );
lineterminated = XMLHandler.getTagValue( entrynode, "lineterminated" );
replacedata = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "replacedata" ) );
ignorelines = XMLHandler.getTagValue( entrynode, "ignorelines" );
listattribut = XMLHandler.getTagValue( entrynode, "listattribut" );
localinfile = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "localinfile" ) );
prorityvalue = Const.toInt( XMLHandler.getTagValue( entrynode, "prorityvalue" ), -1 );
String dbname = XMLHandler.getTagValue( entrynode, "connection" );
addfiletoresult = "Y".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, "addfiletoresult" ) );
connection = DatabaseMeta.findDatabase( databases, dbname );
} catch ( KettleException e ) {
throw new KettleXMLException( "Unable to load job entry of type 'Mysql bulk load' from XML node", e );
}
}
public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
List<SlaveServer> slaveServers ) throws KettleException {
try {
schemaname = rep.getJobEntryAttributeString( id_jobentry, "schemaname" );
tablename = rep.getJobEntryAttributeString( id_jobentry, "tablename" );
filename = rep.getJobEntryAttributeString( id_jobentry, "filename" );
separator = rep.getJobEntryAttributeString( id_jobentry, "separator" );
enclosed = rep.getJobEntryAttributeString( id_jobentry, "enclosed" );
escaped = rep.getJobEntryAttributeString( id_jobentry, "escaped" );
linestarted = rep.getJobEntryAttributeString( id_jobentry, "linestarted" );
lineterminated = rep.getJobEntryAttributeString( id_jobentry, "lineterminated" );
replacedata = rep.getJobEntryAttributeBoolean( id_jobentry, "replacedata" );
ignorelines = rep.getJobEntryAttributeString( id_jobentry, "ignorelines" );
listattribut = rep.getJobEntryAttributeString( id_jobentry, "listattribut" );
localinfile = rep.getJobEntryAttributeBoolean( id_jobentry, "localinfile" );View on GitHub (pinned to f3058517a1)