{"record":{"id":"5e40fcb6ae4cd3ff","repo":"pentaho/pentaho-kettle","slug":"repository-not-found","errorCode":null,"errorMessage":"Repository not found","messagePattern":"Repository not found","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/utils/IRepositoryFactory.java","lineNumber":163,"sourceCode":"        } else {\n          // TODO: add support for specified repositories.xml files...\n          repositoriesMeta.readData(); // Read from the default $HOME/.kettle/repositories.xml file.\n        }\n      } catch ( Exception e ) {\n        throw new KettleException( \"Meta repository not populated\", e ); //$NON-NLS-1$\n      }\n\n      // Find the specified repository.\n      RepositoryMeta repositoryMeta = null;\n      try {\n        if ( singleDiServerInstance ) {\n          repositoryMeta = repositoriesMeta.findRepository( SINGLE_DI_SERVER_INSTANCE );\n        } else {\n          repositoryMeta = repositoriesMeta.findRepository( repositoryName );\n        }\n\n      } catch ( Exception e ) {\n        throw new KettleException( \"Repository not found\", e ); //$NON-NLS-1$\n      }\n\n      if ( repositoryMeta == null ) {\n        throw new KettleException( \"RepositoryMeta is null\" ); //$NON-NLS-1$\n      }\n\n      Repository repository = null;\n      try {\n        repository =\n            PluginRegistry.getInstance().loadClass( RepositoryPluginType.class, repositoryMeta.getId(),\n                Repository.class );\n        repository.init( repositoryMeta );\n\n      } catch ( Exception e ) {\n        throw new KettleException( \"Could not get repository instance\", e ); //$NON-NLS-1$\n      }\n\n      // Two scenarios here: internal to server or external to server. If internal, you are already authenticated. If","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/utils/IRepositoryFactory.java#L145-L181","documentation":"After loading RepositoriesMeta, connect searches for the requested repository via findRepository(repositoryName) (or by SINGLE_DI_SERVER_INSTANCE name). Any exception during this lookup is wrapped in a KettleException 'Repository not found', meaning the repository definition could not be located or the lookup itself blew up.","triggerScenarios":"Calling connect(repositoryName) with a name absent from repositories.xml, or an exception occurring inside repositoriesMeta/findRepository (e.g., malformed entries) while not in singleDiServerInstance mode.","commonSituations":"Typo or case mismatch in the repository name; repository removed from repositories.xml; expecting the single-DI-server instance name but passing a custom name (or vice versa).","solutions":["Check the exact repository name against entries in repositories.xml (case-sensitive).","List available repositories via RepositoriesMeta.readData() + getRepositories() and pick a valid name.","If running inside the DI server, ensure the SINGLE_DI_SERVER_INSTANCE path applies or pass the correct name.","Inspect the chained cause if findRepository threw rather than simply not matching."],"exampleFix":"// before\nRepository repo = factory.connect(\"Pentaho Repo\"); // wrong name\n// after\nRepositoriesMeta meta = new RepositoriesMeta();\nmeta.readData();\nString name = meta.getRepositories().get(0).getName(); // verified existing name\nRepository repo = factory.connect(name);","handlingStrategy":"validation","validationCode":"RepositoriesMeta meta = new RepositoriesMeta(); meta.readData();\nboolean found = Arrays.stream(meta.getRepositories()).anyMatch(r -> r.getName().equals(name));\nif (!found) throw new IllegalArgumentException(\"Repository not defined: \" + name);","typeGuard":null,"tryCatchPattern":"try { repo = factory.connect(name); }\ncatch (KettleException e) { if (e.getMessage().equals(\"Repository not found\")) { listAvailableRepositories(); } }","preventionTips":["Confirm repository names against repositories.xml","Use constants for repository names"],"tags":["pentaho","repository","configuration","lookup-failed"],"backgroundTag":"record-not-found","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"}