{"record":{"id":"0ac193043140ea18","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-a-list-of-repositories-to-locate-repository-0ac193","errorCode":null,"errorMessage":"Unable to get a list of repositories to locate repository '","messagePattern":"Unable to get a list of repositories to locate repository '","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/TransExecutionConfiguration.java","lineNumber":613,"sourceCode":"      } catch ( KettleException e ) {\n        throw new KettleException( \"Unable to hydrate previous result\", e );\n      }\n    }\n\n    // Try to get a handle to the repository from here...\n    //\n    Node repNode = XMLHandler.getSubNode( trecNode, \"repository\" );\n    if ( repNode != null ) {\n      String repositoryName = XMLHandler.getTagValue( repNode, \"name\" );\n      String username = XMLHandler.getTagValue( repNode, \"login\" );\n      String password = Encr.decryptPassword( XMLHandler.getTagValue( repNode, \"password\" ) );\n\n      RepositoriesMeta repositoriesMeta = new RepositoriesMeta();\n      repositoriesMeta.getLog().setLogLevel( log.getLogLevel() );\n      try {\n        repositoriesMeta.readData();\n      } catch ( Exception e ) {\n        throw new KettleException( \"Unable to get a list of repositories to locate repository '\" + repositoryName + \"'\" );\n      }\n      connectRepository( repositoriesMeta, repositoryName, username, password );\n    }\n  }\n\n  public Repository connectRepository( RepositoriesMeta repositoriesMeta, String repositoryName, String username, String password ) throws KettleException {\n    RepositoryMeta repositoryMeta = repositoriesMeta.findRepository( repositoryName );\n    if ( repositoryMeta == null ) {\n      log.logBasic( \"I couldn't find the repository with name '\" + repositoryName + \"'\" );\n      return null;\n    }\n    Repository rep = PluginRegistry.getInstance().loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );\n    if ( rep == null ) {\n      log.logBasic( \"Unable to load repository plugin for '\" + repositoryName + \"'\" );\n      return null;\n    }\n    rep.init( repositoryMeta );\n","sourceCodeStart":595,"sourceCodeEnd":631,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/TransExecutionConfiguration.java#L595-L631","documentation":"Thrown when TransExecutionConfiguration's repository-connect logic cannot read the local repositories.xml list (RepositoriesMeta.readData() threw). Without that list it cannot locate the repository named in the configuration, so it throws with the repository name embedded. Note the original cause is intentionally not chained.","triggerScenarios":"Calling the configuration's connectRepository path (e.g., after fromXML with a repository name, username, password) where repositoriesMeta.readData() throws because ~/.kettle/repositories.xml is missing or unreadable.","commonSituations":"Fresh install / headless server with no repositories.xml; KETTLE_HOME pointing to the wrong directory; permission problems on ~/.kettle; corrupted repositories.xml.","solutions":["Ensure ~/.kettle/repositories.xml exists and is readable (run Spoon once or create it manually)","Check KETTLE_HOME resolves to the directory containing .kettle/repositories.xml","Fix file permissions on the .kettle directory for the executing user","Verify the repositoryName actually exists in repositories.xml before connecting","Catch and log readData()'s exception yourself before invoking the config connect path"],"exampleFix":"// before\nTransExecutionConfiguration cfg = TransExecutionConfiguration.fromXML(xml);\ncfg.setRepository(...); // connect path reads repositories.xml at runtime\n// after: verify prerequisites first\nFile f = new File(System.getProperty(\"KETTLE_HOME\", \".\"), \".kettle/repositories.xml\");\nif (!f.exists()) throw new KettleException(\"repositories.xml missing at \" + f);\n","handlingStrategy":"validation","validationCode":"File reposXml = new File(System.getProperty(\"KETTLE_HOME\", System.getProperty(\"user.home\")), \".kettle/repositories.xml\");\nif (!reposXml.isFile()) throw new KettleException(\"repositories.xml not found: \" + reposXml);\nRepositoriesMeta rm = new RepositoriesMeta(); rm.readData(); // fail early with real cause\nif (rm.searchRepository(repositoryName) == null) throw new KettleException(\"Unknown repository: \" + repositoryName);","typeGuard":null,"tryCatchPattern":"try { cfg.connectRepository(...); } catch (KettleException e) { log.error(\"Repository list unreadable — check ~/.kettle/repositories.xml and KETTLE_HOME\", e); }","preventionTips":["Provision ~/.kettle/repositories.xml on headless servers","Set KETTLE_HOME explicitly for service accounts","Check file permissions after deployments"],"tags":["kettle","repository","configuration","repositories-xml"],"backgroundTag":"missing-config-file","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"}