{"record":{"id":"ce0a79c0a2f08bb0","repo":"pentaho/pentaho-kettle","slug":"unable-to-find-repository-repositoryid","errorCode":null,"errorMessage":"Unable to find repository: \" + repositoryId","messagePattern":"Unable to find repository: \" \\+ repositoryId","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/www/SlaveServerConfig.java","lineNumber":282,"sourceCode":"        jettyOptions.put( Const.KETTLE_CARTE_JETTY_ACCEPT_QUEUE_SIZE, XMLHandler.getTagValue( jettyOptionsNode,\n            XML_TAG_ACCEPT_QUEUE_SIZE ) );\n      }\n      if ( XMLHandler.getTagValue( jettyOptionsNode, XML_TAG_LOW_RES_MAX_IDLE_TIME ) != null ) {\n        jettyOptions.put( Const.KETTLE_CARTE_JETTY_RES_MAX_IDLE_TIME, XMLHandler.getTagValue( jettyOptionsNode,\n            XML_TAG_LOW_RES_MAX_IDLE_TIME ) );\n      }\n    }\n    return jettyOptions;\n  }\n\n  private void openRepository( String repositoryId ) throws KettleException {\n    try {\n\n      RepositoriesMeta repositoriesMeta = new RepositoriesMeta();\n      repositoriesMeta.readData();\n      repositoryMeta = repositoriesMeta.findRepository( repositoryId );\n      if ( repositoryMeta == null ) {\n        throw new KettleException( \"Unable to find repository: \" + repositoryId );\n      }\n      PluginRegistry registry = PluginRegistry.getInstance();\n      repository = registry.loadClass( RepositoryPluginType.class, repositoryMeta, Repository.class );\n      repository.init( repositoryMeta );\n      repository.connect( repositoryUsername, repositoryPassword );\n\n      LogChannel.GENERAL.logBasic( \"Connected to repository '\" + repository.getName() + \"'\" );\n\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to open repository connection\", e );\n    }\n  }\n\n  public void readAutoSequences() throws KettleException {\n    if ( autoSequence == null ) {\n      return;\n    }\n","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/www/SlaveServerConfig.java#L264-L300","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check ~/.kettle/repositories.xml on the Carte host (as the user running Carte) and use the exact repository name/id defined there.","Run Spoon once on the Carte host to register the repository, or copy repositories.xml to the correct user's home.","Fix the repository name in carte-config.xml / SlaveServerConfig to match the registered one (case-sensitive).","Ensure KETTLE_HOME / HOME points at the directory containing repositories.xml when running as a service."],"exampleFix":"// before: carte-config.xml\n<repository id=\"DevRepo\" .../>\n\n// after: matches repositories.xml on the server\n<repository id=\"ProdRepo\" .../>","handlingStrategy":"validation","validationCode":"RepositoriesMeta rm = new RepositoriesMeta();\nrm.readData();\nboolean exists = java.util.stream.IntStream.range(0, rm.nrRepositories())\n    .anyMatch(i -> rm.getRepository(i).getName().equals(configuredRepoName));\nif (!exists) throw new IllegalStateException(\"Repository not registered on this host: \" + configuredRepoName);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep repositories.xml in sync across Carte nodes (config management).","Run Carte under a user whose HOME/KETTLE_HOME contains repositories.xml.","Match repository names exactly (case-sensitive) between carte-config.xml and repositories.xml."],"tags":["carte","repository","configuration","not-found"],"backgroundTag":"entity-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"}