pentaho/pentaho-kettle · error · KettleException

Repository not found

Error message

Repository not found

What it means

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.

Solutions

  1. Check the exact repository name against entries in repositories.xml (case-sensitive).
  2. List available repositories via RepositoriesMeta.readData() + getRepositories() and pick a valid name.
  3. If running inside the DI server, ensure the SINGLE_DI_SERVER_INSTANCE path applies or pass the correct name.
  4. Inspect the chained cause if findRepository threw rather than simply not matching.

Example fix

// before
Repository repo = factory.connect("Pentaho Repo"); // wrong name
// after
RepositoriesMeta meta = new RepositoriesMeta();
meta.readData();
String name = meta.getRepositories().get(0).getName(); // verified existing name
Repository repo = factory.connect(name);
Defensive patterns

Strategy: validation

Validate before calling

RepositoriesMeta meta = new RepositoriesMeta(); meta.readData();
boolean found = Arrays.stream(meta.getRepositories()).anyMatch(r -> r.getName().equals(name));
if (!found) throw new IllegalArgumentException("Repository not defined: " + name);

Try / catch

try { repo = factory.connect(name); }
catch (KettleException e) { if (e.getMessage().equals("Repository not found")) { listAvailableRepositories(); } }

Prevention

When it happens

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

Common situations: 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).

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/utils/IRepositoryFactory.java:163

        } else {
          // TODO: add support for specified repositories.xml files...
          repositoriesMeta.readData(); // Read from the default $HOME/.kettle/repositories.xml file.
        }
      } catch ( Exception e ) {
        throw new KettleException( "Meta repository not populated", e ); //$NON-NLS-1$
      }

      // Find the specified repository.
      RepositoryMeta repositoryMeta = null;
      try {
        if ( singleDiServerInstance ) {
          repositoryMeta = repositoriesMeta.findRepository( SINGLE_DI_SERVER_INSTANCE );
        } else {
          repositoryMeta = repositoriesMeta.findRepository( repositoryName );
        }

      } catch ( Exception e ) {
        throw new KettleException( "Repository not found", e ); //$NON-NLS-1$
      }

      if ( repositoryMeta == null ) {
        throw new KettleException( "RepositoryMeta is null" ); //$NON-NLS-1$
      }

      Repository repository = null;
      try {
        repository =
            PluginRegistry.getInstance().loadClass( RepositoryPluginType.class, repositoryMeta.getId(),
                Repository.class );
        repository.init( repositoryMeta );

      } catch ( Exception e ) {
        throw new KettleException( "Could not get repository instance", e ); //$NON-NLS-1$
      }

      // Two scenarios here: internal to server or external to server. If internal, you are already authenticated. If

View on GitHub (pinned to f3058517a1)