pentaho/pentaho-kettle · error · KettleException
ExecSQLMeta.Exception.UnexpectedErrorReadingStepInfo
ExecSQLMeta.Exception.UnexpectedErrorReadingStepInfo
Error message
ExecSQLMeta.Exception.UnexpectedErrorReadingStepInfo
What it means
Thrown by ExecSQLMeta.readRep when reading the step's configuration from the repository fails. It reads attributes such as sql, connection, and the arg_name entries per argument index; any repository exception is wrapped in a KettleException with this message key. The transformation cannot be loaded from the repository when this fires.
Solutions
- Check the wrapped cause for the repository database error
- Reconnect to the repository and retry loading the transformation
- Upgrade/repair the repository schema to match your PDI version
- Re-save the transformation from a local .ktr backup to rewrite its repository rows
Example fix
// before
transMeta.loadTransMeta(rep, id_transformation, metaStore);
// after
try {
transMeta.loadTransMeta(rep, id_transformation, metaStore);
} catch (KettleException e) {
logError("Repository read failed: " + e.getCause());
transMeta.loadXml("local-copy.ktr"); // load from file instead
} Defensive patterns
Strategy: try-catch
Validate before calling
// before load
if (!rep.isConnected()) rep.connect();
if (rep.getTransformationID(name, directory) == null) throw new IllegalStateException("Transformation missing in repository"); Try / catch
try { transMeta.loadTransMeta(rep, id, metaStore); } catch (KettleException e) { logError("Repository read failed: " + e.getCause()); transMeta.loadXml("fallback.ktr"); } Prevention
- Upgrade the repository schema with each PDI upgrade
- Keep file-based backups of repository transformations
- Avoid concurrent load/modify of the same transformation
- Watch repository DB health before scheduled loads
When it happens
Trigger: Loading an ExecSQL step from a repository where getStepAttributeString/getStepAttributeInteger throws: repository DB unavailable, R_STEP_ATTRIBUTE rows corrupted or deleted, or count mismatch between saved nrargs and stored argument rows.
Common situations: Repository schema drift after PDI upgrade; DB connection dropped during load; another user deleted/modified the transformation mid-load; corrupted repository rows from a failed prior save.
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
- DatabaseJoinMeta.Exception.UnexpectedErrorReadingStepInfo
- ERROR0002.UnexpectedErrorReadingFromTheRepository
- GetTableNamesMeta.Exception.UnexpectedErrorReadingStepInfo
- JobXMLWellFormed.Error.Exception.UnableLoadRep + id_jobentry
- SplitFieldToRowsMeta.Exception.UnexpectedErrorInReadingStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/0ce40d5be331f8ad.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/sql/ExecSQLMeta.java:349
executedEachInputRow = rep.getStepAttributeBoolean( id_step, "execute_each_row" );
singleStatement = rep.getStepAttributeBoolean( id_step, "single_statement" );
replaceVariables = rep.getStepAttributeBoolean( id_step, "replace_variables" );
quoteString = rep.getStepAttributeBoolean( id_step, "quoteString" );
sql = rep.getStepAttributeString( id_step, "sql" );
setParams = rep.getStepAttributeBoolean( id_step, "set_params" );
insertField = rep.getStepAttributeString( id_step, "insert_field" );
updateField = rep.getStepAttributeString( id_step, "update_field" );
deleteField = rep.getStepAttributeString( id_step, "delete_field" );
readField = rep.getStepAttributeString( id_step, "read_field" );
int nrargs = rep.countNrStepAttributes( id_step, "arg_name" );
allocate( nrargs );
for ( int i = 0; i < nrargs; i++ ) {
arguments[i] = rep.getStepAttributeString( id_step, i, "arg_name" );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "ExecSQLMeta.Exception.UnexpectedErrorReadingStepInfo" ), 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, "sql", sql );
rep.saveStepAttribute( id_transformation, id_step, "execute_each_row", executedEachInputRow );
rep.saveStepAttribute( id_transformation, id_step, "single_statement", singleStatement );
rep.saveStepAttribute( id_transformation, id_step, "replace_variables", replaceVariables );
rep.saveStepAttribute( id_transformation, id_step, "quoteString", quoteString );
rep.saveStepAttribute( id_transformation, id_step, "set_params", setParams );
rep.saveStepAttribute( id_transformation, id_step, "insert_field", insertField );
rep.saveStepAttribute( id_transformation, id_step, "update_field", updateField );
rep.saveStepAttribute( id_transformation, id_step, "delete_field", deleteField );
rep.saveStepAttribute( id_transformation, id_step, "read_field", readField );
View on GitHub (pinned to f3058517a1)