pentaho/pentaho-kettle · error · KettleException
JobEntryWaitForSQL.UnableLoadRep
Error message
JobEntryWaitForSQL.UnableLoadRep
What it means
KettleException thrown by JobEntryWaitForSQL.loadRep when reading the job entry's attributes (connection, SQL, timeouts, cycle time, successOnTimeout, clearResultRows) from the repository fails with a KettleDatabaseException. It wraps the original DB exception and identifies the job entry by id. It indicates the repository metadata for this 'Wait for SQL' entry could not be loaded.
Solutions
- Verify the repository database is reachable and credentials are valid
- Check R_JOBENTRY_ATTRIBUTE rows exist for the given id_jobentry and the schema matches your Pentaho version
- Reopen/re-import the job or recreate the Wait For SQL job entry
- Inspect the wrapped KettleDatabaseException cause for the underlying SQL error
Example fix
// before
jobEntry.loadRep(rep, metaStore, idJobentry, databases, slaveServers); // throws
// after
try {
jobEntry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);
} catch (KettleException e) {
logError("Failed loading Wait For SQL entry " + idJobentry + ": " + e.getCause(), e);
// repair repository or recreate entry
} Defensive patterns
Strategy: try-catch
Validate before calling
// before loadRep
if (rep == null || idJobentry == null) throw new IllegalArgumentException("repository and id_jobentry required");
// optionally: verify connectivity with a cheap repository read Try / catch
try {
entry.loadRep(rep, metaStore, idJobentry, databases, slaveServers);
} catch (KettleException e) {
logError("LoadRep failed for id=" + idJobentry + ": " + e.getCause(), e);
// fall back to default entry settings or abort job load
} Prevention
- Keep repository database backups and schema migrations in sync with your Pentaho version
- Monitor repository DB health before bulk job loads
- Avoid hand-editing repository tables
- Recreate job entries instead of patching corrupted rows
When it happens
Trigger: Calling loadRep on a JobEntryWaitForSQL whose attributes cannot be read from the repository, e.g. the row for id_jobentry is missing/corrupt in R_JOBENTRY_ATTRIBUTE, the repository database connection is down, or a schema mismatch causes KettleDatabaseException.
Common situations: Corrupted or partially migrated Pentaho repository database; repository DB temporarily unavailable; opening an old kjb/job stored in a repository with a mismatched schema version.
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
- JobEntryCheckFilesLocked.UnableToLoadFromRepo
- JobEntryCheckFilesLocked.UnableToSaveToRepo
- JobEntryColumnsExist.Meta.UnableLoadRep
- JobEntryColumnsExist.Meta.UnableSaveRep
- JobEntryEval.UnableToLoadFromRepo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/bdc9a96997537c43.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/job/entries/waitforsql/JobEntryWaitForSQL.java:277
try {
connection = rep.loadDatabaseMetaFromJobEntryAttribute( id_jobentry, "connection", "id_database", databases );
schemaname = rep.getJobEntryAttributeString( id_jobentry, "schemaname" );
tablename = rep.getJobEntryAttributeString( id_jobentry, "tablename" );
successCondition =
getSuccessConditionByCode( Const.NVL(
rep.getJobEntryAttributeString( id_jobentry, "success_condition" ), "" ) );
rowsCountValue = rep.getJobEntryAttributeString( id_jobentry, "rows_count_value" );
iscustomSQL = rep.getJobEntryAttributeBoolean( id_jobentry, "is_custom_sql" );
isUseVars = rep.getJobEntryAttributeBoolean( id_jobentry, "is_usevars" );
isAddRowsResult = rep.getJobEntryAttributeBoolean( id_jobentry, "add_rows_result" );
customSQL = rep.getJobEntryAttributeString( id_jobentry, "custom_sql" );
maximumTimeout = rep.getJobEntryAttributeString( id_jobentry, "maximum_timeout" );
checkCycleTime = rep.getJobEntryAttributeString( id_jobentry, "check_cycle_time" );
successOnTimeout = rep.getJobEntryAttributeBoolean( id_jobentry, "success_on_timeout" );
isClearResultList = rep.getJobEntryAttributeBoolean( id_jobentry, "clear_result_rows" );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages
.getString( PKG, "JobEntryWaitForSQL.UnableLoadRep", "" + id_jobentry ), dbe );
}
}
private static int getSuccessConditionByCode( String tt ) {
if ( tt == null ) {
return 0;
}
for ( int i = 0; i < successConditionsCode.length; i++ ) {
if ( successConditionsCode[i].equalsIgnoreCase( tt ) ) {
return i;
}
}
return 0;
}
@OverrideView on GitHub (pinned to f3058517a1)