pentaho/pentaho-kettle · error · KettleException

Unable to get a list of repositories to locate repository '

Error message

Unable to get a list of repositories to locate repository '

What it means

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.

Solutions

  1. Ensure ~/.kettle/repositories.xml exists and is readable (run Spoon once or create it manually)
  2. Check KETTLE_HOME resolves to the directory containing .kettle/repositories.xml
  3. Fix file permissions on the .kettle directory for the executing user
  4. Verify the repositoryName actually exists in repositories.xml before connecting
  5. Catch and log readData()'s exception yourself before invoking the config connect path

Example fix

// before
TransExecutionConfiguration cfg = TransExecutionConfiguration.fromXML(xml);
cfg.setRepository(...); // connect path reads repositories.xml at runtime
// after: verify prerequisites first
File f = new File(System.getProperty("KETTLE_HOME", "."), ".kettle/repositories.xml");
if (!f.exists()) throw new KettleException("repositories.xml missing at " + f);
Defensive patterns

Strategy: validation

Validate before calling

File reposXml = new File(System.getProperty("KETTLE_HOME", System.getProperty("user.home")), ".kettle/repositories.xml");
if (!reposXml.isFile()) throw new KettleException("repositories.xml not found: " + reposXml);
RepositoriesMeta rm = new RepositoriesMeta(); rm.readData(); // fail early with real cause
if (rm.searchRepository(repositoryName) == null) throw new KettleException("Unknown repository: " + repositoryName);

Try / catch

try { cfg.connectRepository(...); } catch (KettleException e) { log.error("Repository list unreadable — check ~/.kettle/repositories.xml and KETTLE_HOME", e); }

Prevention

When it happens

Trigger: 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.

Common situations: Fresh install / headless server with no repositories.xml; KETTLE_HOME pointing to the wrong directory; permission problems on ~/.kettle; corrupted repositories.xml.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/0ac193043140ea18. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/TransExecutionConfiguration.java:613

      } catch ( KettleException e ) {
        throw new KettleException( "Unable to hydrate previous result", e );
      }
    }

    // Try to get a handle to the repository from here...
    //
    Node repNode = XMLHandler.getSubNode( trecNode, "repository" );
    if ( repNode != null ) {
      String repositoryName = XMLHandler.getTagValue( repNode, "name" );
      String username = XMLHandler.getTagValue( repNode, "login" );
      String password = Encr.decryptPassword( XMLHandler.getTagValue( repNode, "password" ) );

      RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
      repositoriesMeta.getLog().setLogLevel( log.getLogLevel() );
      try {
        repositoriesMeta.readData();
      } catch ( Exception e ) {
        throw new KettleException( "Unable to get a list of repositories to locate repository '" + repositoryName + "'" );
      }
      connectRepository( repositoriesMeta, repositoryName, username, password );
    }
  }

  public Repository connectRepository( RepositoriesMeta repositoriesMeta, String repositoryName, String username, String password ) throws KettleException {
    RepositoryMeta repositoryMeta = repositoriesMeta.findRepository( repositoryName );
    if ( repositoryMeta == null ) {
      log.logBasic( "I couldn't find the repository with name '" + repositoryName + "'" );
      return null;
    }
    Repository rep = PluginRegistry.getInstance().loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );
    if ( rep == null ) {
      log.logBasic( "Unable to load repository plugin for '" + repositoryName + "'" );
      return null;
    }
    rep.init( repositoryMeta );

View on GitHub (pinned to f3058517a1)