pentaho/pentaho-kettle · error · KettleException
Unable to get a list of repositories to locate repository '
Error message
Unable to get a list of repositories to locate repository '
What it means
Thrown when TransExecutionConfiguration's repository-connect logic cannot read the local repositories.xml list (RepositoriesMeta.readData() threw). Without that list it cannot locate the repository named in the configuration, so it throws with the repository name embedded. Note the original cause is intentionally not chained.
Solutions
- Ensure ~/.kettle/repositories.xml exists and is readable (run Spoon once or create it manually)
- Check KETTLE_HOME resolves to the directory containing .kettle/repositories.xml
- Fix file permissions on the .kettle directory for the executing user
- Verify the repositoryName actually exists in repositories.xml before connecting
- Catch and log readData()'s exception yourself before invoking the config connect path
Example fix
// before
TransExecutionConfiguration cfg = TransExecutionConfiguration.fromXML(xml);
cfg.setRepository(...); // connect path reads repositories.xml at runtime
// after: verify prerequisites first
File f = new File(System.getProperty("KETTLE_HOME", "."), ".kettle/repositories.xml");
if (!f.exists()) throw new KettleException("repositories.xml missing at " + f);
Defensive patterns
Strategy: validation
Validate before calling
File reposXml = new File(System.getProperty("KETTLE_HOME", System.getProperty("user.home")), ".kettle/repositories.xml");
if (!reposXml.isFile()) throw new KettleException("repositories.xml not found: " + reposXml);
RepositoriesMeta rm = new RepositoriesMeta(); rm.readData(); // fail early with real cause
if (rm.searchRepository(repositoryName) == null) throw new KettleException("Unknown repository: " + repositoryName); Try / catch
try { cfg.connectRepository(...); } catch (KettleException e) { log.error("Repository list unreadable — check ~/.kettle/repositories.xml and KETTLE_HOME", e); } Prevention
- Provision ~/.kettle/repositories.xml on headless servers
- Set KETTLE_HOME explicitly for service accounts
- Check file permissions after deployments
When it happens
Trigger: Calling the configuration's connectRepository path (e.g., after fromXML with a repository name, username, password) where repositoriesMeta.readData() throws because ~/.kettle/repositories.xml is missing or unreadable.
Common situations: Fresh install / headless server with no repositories.xml; KETTLE_HOME pointing to the wrong directory; permission problems on ~/.kettle; corrupted repositories.xml.
Related errors
- Could not execute specified in a repository since we're not…
- JobJob.Exception.ReferencedTransformationIdIsNull
- JobTrans.Exception.ReferencedTransformationIdIsNull
- TransExecutorDialog.Exception.UnableToFindRepositoryDirector…
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/0ac193043140ea18.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/TransExecutionConfiguration.java:613
} catch ( KettleException e ) {
throw new KettleException( "Unable to hydrate previous result", e );
}
}
// Try to get a handle to the repository from here...
//
Node repNode = XMLHandler.getSubNode( trecNode, "repository" );
if ( repNode != null ) {
String repositoryName = XMLHandler.getTagValue( repNode, "name" );
String username = XMLHandler.getTagValue( repNode, "login" );
String password = Encr.decryptPassword( XMLHandler.getTagValue( repNode, "password" ) );
RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
repositoriesMeta.getLog().setLogLevel( log.getLogLevel() );
try {
repositoriesMeta.readData();
} catch ( Exception e ) {
throw new KettleException( "Unable to get a list of repositories to locate repository '" + repositoryName + "'" );
}
connectRepository( repositoriesMeta, repositoryName, username, password );
}
}
public Repository connectRepository( RepositoriesMeta repositoriesMeta, String repositoryName, String username, String password ) throws KettleException {
RepositoryMeta repositoryMeta = repositoriesMeta.findRepository( repositoryName );
if ( repositoryMeta == null ) {
log.logBasic( "I couldn't find the repository with name '" + repositoryName + "'" );
return null;
}
Repository rep = PluginRegistry.getInstance().loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );
if ( rep == null ) {
log.logBasic( "Unable to load repository plugin for '" + repositoryName + "'" );
return null;
}
rep.init( repositoryMeta );
View on GitHub (pinned to f3058517a1)