pentaho/pentaho-kettle · error · KettleException
Invalid repository type
Error message
Invalid repository type
What it means
ClientRepositoryLoader.getPur unwraps the Pentaho Unified Repository (IUnifiedRepository) from a Kettle Repository via getUnderlyingRepository(); if the underlying repository is null (the repository is not a PUR-type repository), it throws this KettleException. The VFS plugin only works with the unified repository.
Solutions
- Configure a Pentaho Unified Repository as the repository used with pur:// paths
- Check repository.getUnderlyingRepository() != null before using the repo-vfs filesystem
- Switch away from legacy file/DB repositories — they are incompatible with this VFS plugin
- Verify the repository metadata points at a PUR server (Pentaho Server/BaServer)
Example fix
// before
Repository repo = RepostoryRegistry.findDefault();
FileSystemOptions opts = new FileSystemOptions();
PurFileSystemConfig.getInstance(opts).setRepositoryName(repo.getName());
// after
if ( repo.getUnderlyingRepository() == null ) {
throw new IllegalArgumentException( repo.getName() + " is not a unified (PUR) repository" );
}
PurFileSystemConfig.getInstance(opts).setRepositoryName(repo.getName()); Defensive patterns
Strategy: validation
Validate before calling
// Java
Repository repo = Registry.getRepository();
if ( repo == null || repo.getUnderlyingRepository() == null ) {
throw new IllegalStateException( "A Pentaho Unified Repository is required for pur:// access" );
} Try / catch
try {
IUnifiedRepository pur = loader.getPur( repo );
} catch ( KettleException e ) {
if ( "Invalid repository type".equals( e.getMessage() ) ) {
logError( "Connect to a PUR repository, not a legacy/file repository" );
}
throw e;
} Prevention
- Only use repo-vfs with Pentaho Unified Repositories
- Check getUnderlyingRepository() before mounting pur:// filesystems
- Migrate off legacy file repositories before adopting pur:// paths
When it happens
Trigger: getRepository/resolve on a pur:// VFS path where the configured Kettle Repository wraps a non-PUR implementation (e.g. legacy file-based Kettle repository) whose getUnderlyingRepository() returns null.
Common situations: KETTLE_REPOSITORY or default repository pointing at an old file repository; connecting with a plugin repository type that has no unified underlying repository; misconfigured repo-vfs options.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- Repository not found:
- 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/69441d35ca98911d.
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:50
* */
public class ClientRepositoryLoader {
private static Logger log = LoggerFactory.getLogger( ClientRepositoryLoader.class );
private final LazyLoader<RepositoriesMeta> repositoriesLoader = new LazyLoader<>( () -> {
var repositories = new RepositoriesMeta();
try {
repositories.readData();
} catch ( KettleException e ) {
log.error( "Unable to load repositories.xml", e );
}
return repositories;
} );
public IUnifiedRepository getPur( Repository repository ) throws KettleException {
var pur = repository.getUnderlyingRepository();
if ( pur == null ) {
throw new KettleException( "Invalid repository type" );
}
return pur;
}
public Repository getRepository( FileSystemOptions opts ) throws KettleException {
var cfg = new PurFileSystemConfig( opts );
var bowl = cfg.getBowl();
if ( bowl.isPresent() && bowl.get() instanceof RepositoryBowl repoBowl ) {
log.debug( "Using repository from bowl" );
return repoBowl.getRepository();
}
Spoon spoon = Spoon.getInstance();
if ( spoon != null ) {
log.debug( "Using spoon repository" );
return spoon.getRepository();
}View on GitHub (pinned to f3058517a1)