pentaho/pentaho-kettle · error · KettleException

Unable to find repository: " + repositoryId

Error message

Unable to find repository: " + repositoryId

What it means

SlaveServerConfig.openRepository looks up a repository by id in RepositoriesMeta (read from repositories.xml / ~/.kettle) and throws KettleException("Unable to find repository: <id>") when findRepository returns null, i.e. no repository with that id/name is defined on this machine. This happens while resolving the repository a Carte server should auto-connect to.

Solutions

  1. Check ~/.kettle/repositories.xml on the Carte host (as the user running Carte) and use the exact repository name/id defined there.
  2. Run Spoon once on the Carte host to register the repository, or copy repositories.xml to the correct user's home.
  3. Fix the repository name in carte-config.xml / SlaveServerConfig to match the registered one (case-sensitive).
  4. Ensure KETTLE_HOME / HOME points at the directory containing repositories.xml when running as a service.

Example fix

// before: carte-config.xml
<repository id="DevRepo" .../>

// after: matches repositories.xml on the server
<repository id="ProdRepo" .../>
Defensive patterns

Strategy: validation

Validate before calling

RepositoriesMeta rm = new RepositoriesMeta();
rm.readData();
boolean exists = java.util.stream.IntStream.range(0, rm.nrRepositories())
    .anyMatch(i -> rm.getRepository(i).getName().equals(configuredRepoName));
if (!exists) throw new IllegalStateException("Repository not registered on this host: " + configuredRepoName);

Prevention

When it happens

Trigger: Carte is started with a config (carte-config.xml or SlaveServerConfig) referencing a repository id/name that does not exist in ~/.kettle/repositories.xml on that host; running as a service user whose home differs, so repositories.xml isn't found or lacks the entry.

Common situations: Deploying carte-config.xml from dev to prod where the repository is named differently; running Carte under a service account with a different HOME so the Kettle metadata directory isn't picked up; typo in the repository name attribute.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/www/SlaveServerConfig.java:282

        jettyOptions.put( Const.KETTLE_CARTE_JETTY_ACCEPT_QUEUE_SIZE, XMLHandler.getTagValue( jettyOptionsNode,
            XML_TAG_ACCEPT_QUEUE_SIZE ) );
      }
      if ( XMLHandler.getTagValue( jettyOptionsNode, XML_TAG_LOW_RES_MAX_IDLE_TIME ) != null ) {
        jettyOptions.put( Const.KETTLE_CARTE_JETTY_RES_MAX_IDLE_TIME, XMLHandler.getTagValue( jettyOptionsNode,
            XML_TAG_LOW_RES_MAX_IDLE_TIME ) );
      }
    }
    return jettyOptions;
  }

  private void openRepository( String repositoryId ) throws KettleException {
    try {

      RepositoriesMeta repositoriesMeta = new RepositoriesMeta();
      repositoriesMeta.readData();
      repositoryMeta = repositoriesMeta.findRepository( repositoryId );
      if ( repositoryMeta == null ) {
        throw new KettleException( "Unable to find repository: " + repositoryId );
      }
      PluginRegistry registry = PluginRegistry.getInstance();
      repository = registry.loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );
      repository.init( repositoryMeta );
      repository.connect( repositoryUsername, repositoryPassword );

      LogChannel.GENERAL.logBasic( "Connected to repository '" + repository.getName() + "'" );

    } catch ( Exception e ) {
      throw new KettleException( "Unable to open repository connection", e );
    }
  }

  public void readAutoSequences() throws KettleException {
    if ( autoSequence == null ) {
      return;
    }

View on GitHub (pinned to f3058517a1)