pentaho/pentaho-kettle · error · KettleException
JobEntryConnectedToRepository.Meta.UnableToSaveToRep
Error message
JobEntryConnectedToRepository.Meta.UnableToSaveToRep
What it means
JobEntryConnectedToRepository.saveRep wraps KettleDatabaseException from saving the entry's attributes (isspecificrep, repname, isspecificuser, username) into a KettleException keyed 'JobEntryConnectedToRepository.Meta.UnableToSaveToRep' plus the job id. It means the job entry could not be persisted to the repository database.
Solutions
- Verify repository DB connectivity and write permissions
- Retry the save once the database is reachable
- Save the job locally (.kjb) as a fallback while the repository is unavailable
- Check the wrapped KettleDatabaseException for the failing SQL/constraint
Defensive patterns
Strategy: retry
Validate before calling
// confirm write access before saving
if ( rep.isReadOnly() ) {
throw new ValidationException( "Repository is read-only" );
} Try / catch
try {
jobMeta.saveToRepository( rep, null );
} catch ( KettleException e ) {
if ( e.getCause() instanceof KettleDatabaseException ) {
// retry after reconnecting, or save locally as fallback
jobMeta.saveToFile( "/tmp/backup.kjb", "none", "none" );
}
} Prevention
- Ensure repository write permissions for the user
- Reconnect stale repository sessions before saving
- Keep client and repository schema versions in sync
- Keep a local .kjb copy as fallback
When it happens
Trigger: saveRep called during job save when the repository insert/update of r_jobentry_attribute rows fails — DB connection loss, constraint violation, read-only repository, or schema mismatch.
Common situations: Repository database offline or connection dropped mid-save; repository opened read-only; user lacks write permission; version mismatch between client and repository schema.
Related errors
- JobEntryAbort.UnableToLoadFromRepo.Label
- JobEntryAbort.UnableToSaveToRepo.Label
- JobEntryAddResultFilenames.UnableToLoadFromRepo
- JobEntryConnectedToRepository.Meta.UnableToLoadFromRep
- JobEntryMailValidator.Meta.UnableToSaveToRep
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/2c57c32c0dbecacc.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/connected-to-repository/impl/src/main/java/org/pentaho/di/job/entries/connectedtorepository/JobEntryConnectedToRepository.java:155
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages.getString(
PKG, "JobEntryConnectedToRepository.Meta.UnableToLoadFromRep" )
+ id_jobentry, dbe );
}
}
// Save the attributes of this job entry
//
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_job ) throws KettleException {
try {
rep.saveJobEntryAttribute( id_job, getObjectId(), "isspecificrep", isspecificrep );
rep.saveJobEntryAttribute( id_job, getObjectId(), "repname", repname );
rep.saveJobEntryAttribute( id_job, getObjectId(), "isspecificuser", isspecificuser );
rep.saveJobEntryAttribute( id_job, getObjectId(), "username", username );
} catch ( KettleDatabaseException dbe ) {
throw new KettleException( BaseMessages.getString(
PKG, "JobEntryConnectedToRepository.Meta.UnableToSaveToRep" )
+ id_job, dbe );
}
}
/**
* Execute this job entry and return the result. In this case it means, just set the result boolean in the Result
* class.
*
* @param previousResult
* The result of the previous execution
* @return The Result of the execution.
*/
public Result execute( Result previousResult, int nr ) {
Result result = previousResult;
result.setNrErrors( 1 );
result.setResult( false );
View on GitHub (pinned to f3058517a1)