pentaho/pentaho-kettle · error · RuntimeException
Repository not connected
Error message
Repository not connected
What it means
RepositoryVfsProvider.getRepo() fetches the connected repository instance from repositoryInstance.getConnectedRepositoryInstance(); if none is connected (null) it throws RuntimeException 'Repository not connected'. All repo:// VFS operations depend on this connected repository.
Solutions
- Connect to the repository (Spoon login or programmatically via the repository connect API) before using repo:// paths.
- Verify getConnectedRepositoryInstance() is non-null at job startup and fail fast with a clear message.
- Re-establish the connection if the session expired, then retry the operation.
- Avoid repo:// URIs when running without a repository; use file:// outputs instead.
Example fix
// before
FileObject fo = VFS.getManager().resolveFile("repo:///home/admin/report.prpt");
// after
Repository repo = KettleRepositoryLocator.getConnectedRepositoryInstance();
if (repo == null) {
repository.connect(username, password); // or prompt user to log in
}
FileObject fo = VFS.getManager().resolveFile("repo:///home/admin/report.prpt"); Defensive patterns
Strategy: validation
Validate before calling
Repository repo = repositoryInstance.getConnectedRepositoryInstance();
if (repo == null) { throw new IllegalStateException("Connect to the Pentaho repository before using repo:// paths"); } Try / catch
try {
FileObject fo = VFS.getManager().resolveFile(repoUri);
} catch (RuntimeException e) {
if ("Repository not connected".equals(e.getMessage())) {
repository.connect(user, pass); // then retry once
} else throw e;
} Prevention
- Establish the repository connection at application/Spoon startup before resolving repo:// URIs.
- Fail fast with a clear UI message if no repository is connected.
- Handle session expiry by reconnecting and retrying.
- Use file:// outputs in non-repository (headless) runs.
When it happens
Trigger: Any repo:// file operation (findFile, getInputStream, getOutputStream) while no repository connection is established — getConnectedRepositoryInstance() returns null.
Common situations: Using repo:// URIs in transformations before the user connected to a Pentaho repository in Spoon; a disconnected/expired repository session; running headless without programmatically connecting to the repository.
Related errors
- No repository
- Append file in repository is not possible
- ConnectionFileSystem.FailedTransformProviderFilename
- Could not execute specified in a repository since we're not…
- Error connecting to the repository!
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/1cb8de26b7778955.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pentaho-repository-vfs/core/src/main/java/org/pentaho/repositoryvfs/vfs/RepositoryVfsProvider.java:64
}
private void registerRepoVFS() {
FileSystemManager fsm = KettleVFS.getInstance().getFileSystemManager();
if ( fsm instanceof DefaultFileSystemManager ) {
try {
( (DefaultFileSystemManager) fsm ).addProvider( SCHEME, this );
final Spoon spoon = Spoon.getInstance();
System.out.println( );
} catch ( Exception ex ) {
throw new RuntimeException( "Error initialize repo:// VFS", ex );
}
}
}
protected Repository getRepo() {
Repository repo = repositoryInstance.getConnectedRepositoryInstance();
if ( repo == null ) {
throw new RuntimeException( "Repository not connected" );
}
return repo;
}
@Override
public FileObject findFile( FileObject baseFile, String uri, FileSystemOptions fileSystemOptions )
throws FileSystemException {
if ( !uri.startsWith( "repo://" ) ) {
throw new FileSystemException( "WRONG_URL" );
}
String path = '/' + uri.substring( 7 );
return new RepositoryVfsFileObject( this, path );
}
@Override
public FileObject createFileSystem( String scheme, FileObject file, FileSystemOptions fileSystemOptions )
throws FileSystemException {View on GitHub (pinned to f3058517a1)