pentaho/pentaho-kettle · error · KettleException
Repository not found:
Error message
Repository not found:
What it means
connectToRepository looks up the repository by name in the loaded repositories metadata; findRepository returns null when no repository with that name is defined, and this KettleException (message plus repositoryName) is thrown. Called by getRepository when resolving pur:// URIs.
Solutions
- Define a repository with that exact name in Kettle repository metadata (Tool > Repository > Connect) or repositories.xml
- Match the repository name string exactly (case and whitespace) with what is configured
- List available repositories (RepositoriesMeta) and correct the configured name
- Package a repositories.xml with the environment (or use KETTLE_SHARED_HOME) so the name resolves
Example fix
// before
PurFileSystemConfig.getInstance(opts).setRepositoryName("pur Repo"); // trailing space
// after
PurFileSystemConfig.getInstance(opts).setRepositoryName("purRepo"); // exact name from repositories.xml Defensive patterns
Strategy: validation
Validate before calling
// Java — verify the name exists before mounting RepositoriesMeta all = new RepositoriesMeta(); all.readData(); boolean exists = java.util.Arrays.stream( all.getRepositories() ) .anyMatch( r -> r.getName().equals( repoName ) ); if ( !exists ) throw new IllegalStateException( "Repository not defined: " + repoName );
Try / catch
try {
Repository repo = loader.getRepository( opts );
} catch ( KettleException e ) {
if ( String.valueOf( e.getMessage() ).startsWith( "Repository not found: " ) ) {
logError( "Define the repository in repositories.xml or fix the name" );
}
throw e;
} Prevention
- Keep repositories.xml in sync across environments
- Trim and exact-match repository names in config
- Enumerate defined repositories at startup and fail fast with the valid list
When it happens
Trigger: PurFileSystemConfig.getRepoName() returns a name that does not match any repository in repositoriesLoader's RepositoriesMeta — the name is misspelled, or repositories.xml has no such entry on this machine.
Common situations: Moving jobs between machines where the named repository isn't defined; case/whitespace mismatch in the repository name; repository defined only in another user's ~/.kettle/repositories.xml.
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
- Invalid repository type
- Append file in repository is not possible
- ConnectionFileSystem.ExpectedConnectionNotFound
- Could not connect to repository: ...
- Could not execute specified in a repository since we're not…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/c7d9c7f9bfd246f1.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/repo-vfs/repo-vfs-pdi/src/main/java/org/pentaho/di/repovfs/plugin/client/ClientRepositoryLoader.java:86
}
// there is no spoon
log.debug( "Connecting to repository" );
var repository = connectToRepository(
cfg.getRepoName().orElseThrow( () -> new KettleException( "No repository name" ) ),
cfg.getUser().orElseThrow( () -> new KettleException( "No user name" ) ),
cfg.getPass().orElseThrow( () -> new KettleException( "No password" ) ) );
if ( repository == null ) {
throw new KettleException( "No repository" );
}
return repository;
}
private Repository connectToRepository( String repositoryName, String user, String password )
throws KettleException {
var repositories = repositoriesLoader.get();
var repoMeta = repositories.findRepository( repositoryName );
if ( repoMeta == null ) {
throw new KettleException( "Repository not found: " + repositoryName );
}
var repo = PluginRegistry.getInstance().loadClass( RepositoryPluginType.class, repoMeta, Repository.class );
repo.init( repoMeta );
repo.connect( user, password );
return repo;
}
}
View on GitHub (pinned to f3058517a1)