{"record":{"id":"69441d35ca98911d","repo":"pentaho/pentaho-kettle","slug":"invalid-repository-type","errorCode":null,"errorMessage":"Invalid repository type","messagePattern":"Invalid repository type","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/repo-vfs/repo-vfs-pdi/src/main/java/org/pentaho/di/repovfs/plugin/client/ClientRepositoryLoader.java","lineNumber":50,"sourceCode":" * */\npublic class ClientRepositoryLoader {\n\n  private static Logger log = LoggerFactory.getLogger( ClientRepositoryLoader.class );\n\n  private final LazyLoader<RepositoriesMeta> repositoriesLoader = new LazyLoader<>( () -> {\n    var repositories = new RepositoriesMeta();\n    try {\n      repositories.readData();\n    } catch ( KettleException e ) {\n      log.error( \"Unable to load repositories.xml\", e );\n    }\n    return repositories;\n  } );\n\n  public IUnifiedRepository getPur( Repository repository ) throws KettleException {\n    var pur = repository.getUnderlyingRepository();\n    if ( pur == null ) {\n      throw new KettleException( \"Invalid repository type\" );\n    }\n    return pur;\n  }\n\n  public Repository getRepository( FileSystemOptions opts ) throws KettleException {\n    var cfg = new PurFileSystemConfig( opts );\n\n    var bowl = cfg.getBowl();\n    if ( bowl.isPresent() && bowl.get() instanceof RepositoryBowl repoBowl ) {\n      log.debug( \"Using repository from bowl\" );\n      return repoBowl.getRepository();\n    }\n\n    Spoon spoon = Spoon.getInstance();\n    if ( spoon != null ) {\n      log.debug( \"Using spoon repository\" );\n      return spoon.getRepository();\n    }","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/repo-vfs/repo-vfs-pdi/src/main/java/org/pentaho/di/repovfs/plugin/client/ClientRepositoryLoader.java#L32-L68","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)"],"exampleFix":"// before\nRepository repo = RepostoryRegistry.findDefault();\nFileSystemOptions opts = new FileSystemOptions();\nPurFileSystemConfig.getInstance(opts).setRepositoryName(repo.getName());\n// after\nif ( repo.getUnderlyingRepository() == null ) {\n  throw new IllegalArgumentException( repo.getName() + \" is not a unified (PUR) repository\" );\n}\nPurFileSystemConfig.getInstance(opts).setRepositoryName(repo.getName());","handlingStrategy":"validation","validationCode":"// Java\nRepository repo = Registry.getRepository();\nif ( repo == null || repo.getUnderlyingRepository() == null ) {\n  throw new IllegalStateException( \"A Pentaho Unified Repository is required for pur:// access\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  IUnifiedRepository pur = loader.getPur( repo );\n} catch ( KettleException e ) {\n  if ( \"Invalid repository type\".equals( e.getMessage() ) ) {\n    logError( \"Connect to a PUR repository, not a legacy/file repository\" );\n  }\n  throw e;\n}","preventionTips":["Only use repo-vfs with Pentaho Unified Repositories","Check getUnderlyingRepository() before mounting pur:// filesystems","Migrate off legacy file repositories before adopting pur:// paths"],"tags":["repository","vfs","configuration"],"backgroundTag":"incompatible-source-type","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}