pentaho/pentaho-kettle · error · KettleException
MySQLBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository
MySQLBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository
Error message
MySQLBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository
What it means
readRep loads the step's settings from a repository and wraps any failure in a KettleException with the UnexpectedErrorReadingStepInfoFromRepository message. It means reading the MySQL Bulk Loader's attributes from the repository database failed — bad attribute data, a repository access error, or an unrecognized stored value. The cause carries the underlying error.
Solutions
- Check the KettleException cause (getCause()) to see whether it is a repository access error or a bad attribute value.
- Re-save the step from Spoon to rewrite its repository attributes in the current format.
- Verify the repository connection and that the PDI repository schema matches your Kettle version (run the repository upgrade if needed).
- If only one transformation is affected, recreate the MySQL Bulk Loader step and re-save to replace the corrupted attributes.
Example fix
// before: manual repository edits leave an unparseable attribute UPDATE r_step_attribute SET value_str = 'bogus' WHERE code = 'field_format_ok'; // after: fix via the supported path — re-save the step in Spoon, or restore a valid value UPDATE r_step_attribute SET value_str = 'none' WHERE code = 'field_format_ok';
Defensive patterns
Strategy: try-catch
Validate before calling
// Before loading from repository, verify the repository is reachable
repository.connect( user, pass );
if ( repository.findStep( transformationObjectId, "bulk loader" ) == null ) {
throw new IllegalStateException( "Bulk loader step missing from repository" );
} Try / catch
try {
transMeta = new TransMeta( repository, transformationPath, null );
} catch ( KettleException e ) {
if ( String.valueOf( e.getMessage() ).contains( "UnexpectedErrorReadingStepInfo" ) ) {
log.error( "Repository read of bulk loader step failed; cause:", e.getCause() );
// fallback: load the same transformation from a .ktr export
transMeta = new TransMeta( backupKtrPath );
} else {
throw e;
}
} Prevention
- Keep the repository schema upgraded to match your PDI version.
- Back up transformations as .ktr exports so corrupted repository entries can be restored.
- Avoid direct SQL edits to r_step_attribute rows.
- Test repository connectivity before automated loads.
When it happens
Trigger: readRep (called when a transformation is loaded from a repository) throws when rep.getStepAttributeString or attribute-count queries fail, getFieldFormatType cannot interpret a stored field_format_ok value, or any other exception occurs while iterating stored field rows.
Common situations: Corrupted or partially deleted repository rows for the step; repository schema version mismatch (older/newer PDI repository format); stored format-type string no longer recognized after an upgrade; repository connectivity problems during load.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- FuzzyMatchMeta.Exception.UnexpecteErrorReadingStepInfoFromRe…
- GetTableNamesMeta.Exception.UnableToSaveStepInfo
- GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFro…
- GPBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository
- GPBulkLoaderMeta.Exception.UnableToSaveStepInfoToRepository
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b81c11231a712608.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/mysql-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/mysqlbulkloader/MySQLBulkLoaderMeta.java:356
replacingData = rep.getStepAttributeBoolean( id_step, "replace" );
ignoringErrors = rep.getStepAttributeBoolean( id_step, "ignore" );
localFile = rep.getStepAttributeBoolean( id_step, "local" );
bulkSize = rep.getStepAttributeString( id_step, "bulk_size" );
int nrvalues = rep.countNrStepAttributes( id_step, "stream_name" );
allocate( nrvalues );
for ( int i = 0; i < nrvalues; i++ ) {
fieldTable[i] = rep.getStepAttributeString( id_step, i, "stream_name" );
fieldStream[i] = rep.getStepAttributeString( id_step, i, "field_name" );
if ( fieldStream[i] == null ) {
fieldStream[i] = fieldTable[i];
}
fieldFormatType[i] = getFieldFormatType( rep.getStepAttributeString( id_step, i, "field_format_ok" ) );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( PKG,
"MySQLBulkLoaderMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository" ), e );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step )
throws KettleException {
try {
rep.saveDatabaseMetaStepAttribute( id_transformation, id_step, "id_connection", databaseMeta );
rep.saveStepAttribute( id_transformation, id_step, "schema", schemaName );
rep.saveStepAttribute( id_transformation, id_step, "table", tableName );
rep.saveStepAttribute( id_transformation, id_step, "encoding", encoding );
rep.saveStepAttribute( id_transformation, id_step, "enclosure", enclosure );
rep.saveStepAttribute( id_transformation, id_step, "delimiter", delimiter );
rep.saveStepAttribute( id_transformation, id_step, "escape_char", escapeChar );
rep.saveStepAttribute( id_transformation, id_step, "fifo_file_name", fifoFileName );
rep.saveStepAttribute( id_transformation, id_step, "replace", replacingData );
rep.saveStepAttribute( id_transformation, id_step, "ignore", ignoringErrors );
rep.saveStepAttribute( id_transformation, id_step, "local", localFile );View on GitHub (pinned to f3058517a1)