pentaho/pentaho-kettle · error · KettleException
Unable to find repository: " + repositoryId
Error message
Unable to find repository: " + repositoryId
What it means
SlaveServerConfig.openRepository looks up a repository by id in RepositoriesMeta (read from repositories.xml / ~/.kettle) and throws KettleException("Unable to find repository: <id>") when findRepository returns null, i.e. no repository with that id/name is defined on this machine. This happens while resolving the repository a Carte server should auto-connect to.
Solutions
- Check ~/.kettle/repositories.xml on the Carte host (as the user running Carte) and use the exact repository name/id defined there.
- Run Spoon once on the Carte host to register the repository, or copy repositories.xml to the correct user's home.
- Fix the repository name in carte-config.xml / SlaveServerConfig to match the registered one (case-sensitive).
- Ensure KETTLE_HOME / HOME points at the directory containing repositories.xml when running as a service.
Example fix
// before: carte-config.xml <repository id="DevRepo" .../> // after: matches repositories.xml on the server <repository id="ProdRepo" .../>
Defensive patterns
Strategy: validation
Validate before calling
RepositoriesMeta rm = new RepositoriesMeta();
rm.readData();
boolean exists = java.util.stream.IntStream.range(0, rm.nrRepositories())
.anyMatch(i -> rm.getRepository(i).getName().equals(configuredRepoName));
if (!exists) throw new IllegalStateException("Repository not registered on this host: " + configuredRepoName); Prevention
- Keep repositories.xml in sync across Carte nodes (config management).
- Run Carte under a user whose HOME/KETTLE_HOME contains repositories.xml.
- Match repository names exactly (case-sensitive) between carte-config.xml and repositories.xml.
When it happens
Trigger: Carte is started with a config (carte-config.xml or SlaveServerConfig) referencing a repository id/name that does not exist in ~/.kettle/repositories.xml on that host; running as a service user whose home differs, so repositories.xml isn't found or lacks the entry.
Common situations: Deploying carte-config.xml from dev to prod where the repository is named differently; running Carte under a service account with a different HOME so the Kettle metadata directory isn't picked up; typo in the repository name attribute.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- A server socket allocation always has to accompanied by…
- AutoDoc.Exception.RepositoryDirectoryNotFound
- Could not connect to repository: ...
- Could not execute specified in a repository since we're not…
- Could not find folder [ + id + ]
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/ce0a79c0a2f08bb0.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/www/SlaveServerConfig.java:282
jettyOptions.put( Const.KETTLE_CARTE_JETTY_ACCEPT_QUEUE_SIZE, XMLHandler.getTagValue( jettyOptionsNode,
XML_TAG_ACCEPT_QUEUE_SIZE ) );
}
if ( XMLHandler.getTagValue( jettyOptionsNode, XML_TAG_LOW_RES_MAX_IDLE_TIME ) != null ) {
jettyOptions.put( Const.KETTLE_CARTE_JETTY_RES_MAX_IDLE_TIME, XMLHandler.getTagValue( jettyOptionsNode,
XML_TAG_LOW_RES_MAX_IDLE_TIME ) );
}
}
return jettyOptions;
}
private void openRepository( String repositoryId ) throws KettleException {
try {
RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
repositoriesMeta.readData();
repositoryMeta = repositoriesMeta.findRepository( repositoryId );
if ( repositoryMeta == null ) {
throw new KettleException( "Unable to find repository: " + repositoryId );
}
PluginRegistry registry = PluginRegistry.getInstance();
repository = registry.loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );
repository.init( repositoryMeta );
repository.connect( repositoryUsername, repositoryPassword );
LogChannel.GENERAL.logBasic( "Connected to repository '" + repository.getName() + "'" );
} catch ( Exception e ) {
throw new KettleException( "Unable to open repository connection", e );
}
}
public void readAutoSequences() throws KettleException {
if ( autoSequence == null ) {
return;
}
View on GitHub (pinned to f3058517a1)