{"record":{"id":"231ec43df898c476","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-the-list-of-repository-objects-from-the","errorCode":null,"errorMessage":"Unable to get the list of repository objects from the repository","messagePattern":"Unable to get the list of repository objects from the repository","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/get-repository-names/impl/src/main/java/org/pentaho/di/trans/steps/getrepositorynames/GetRepositoryNames.java","lineNumber":203,"sourceCode":"        RepositoryDirectoryInterface tree = repository.loadRepositoryDirectoryTree();\n\n        // Loop over the directories and add the discovered objects to the list...\n        //\n        for ( int i = 0; i < meta.getDirectory().length; i++ ) {\n\n          RepositoryDirectoryInterface dir = tree.findDirectory( environmentSubstitute( meta.getDirectory()[i] ) );\n          if ( dir != null ) {\n            List<RepositoryElementMetaInterface> objects =\n                getRepositoryObjects( repository, dir, meta.getIncludeSubFolders()[i], environmentSubstitute( meta\n                    .getNameMask()[i] ), environmentSubstitute( meta.getExcludeNameMask()[i] ) );\n            list.addAll( objects );\n          }\n        }\n      }\n\n      return list;\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to get the list of repository objects from the repository\", e );\n    }\n  }\n\n  private List<RepositoryElementMetaInterface> getRepositoryObjects( Repository repository,\n      RepositoryDirectoryInterface directory, boolean subdirs, String nameMask, String excludeNameMask )\n    throws KettleException {\n    List<RepositoryElementMetaInterface> list = new ArrayList<RepositoryElementMetaInterface>();\n    List<RepositoryElementMetaInterface> objects = new ArrayList<RepositoryElementMetaInterface>();\n    if ( meta.getObjectTypeSelection().areTransformationsSelected() ) {\n      objects.addAll( repository.getTransformationObjects( directory.getObjectId(), false ) );\n    }\n    if ( meta.getObjectTypeSelection().areJobsSelected() ) {\n      objects.addAll( repository.getJobObjects( directory.getObjectId(), false ) );\n    }\n\n    for ( RepositoryElementMetaInterface object : objects ) {\n      boolean add = false;\n      if ( Utils.isEmpty( nameMask ) || object.getName().matches( nameMask ) ) {","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/get-repository-names/impl/src/main/java/org/pentaho/di/trans/steps/getrepositorynames/GetRepositoryNames.java#L185-L221","documentation":"GetRepositoryNames.getRepositoryObjects() enumerates repository objects (via repository.getRepositoryObject or directory listings) to build the step's file list. Any exception during enumeration is wrapped in a KettleException with this message. The step init() fails, so the transformation cannot start.","triggerScenarios":"Initializing the step while connected to a repository: the repository is disconnected/unavailable, the target directory does not exist, or the repository user lacks rights to list objects in the directory.","commonSituations":"Running the transformation on a slave/cluster node without a repository connection; repository session expired; wrong repository directory path configured; permissions restricted on the directory.","solutions":["Ensure the transformation is connected to a valid repository before running the step","Verify the configured repository directory exists and is listable by the repository user","Re-login/reconnect the repository session and retry","Inspect the cause for the underlying repository/DB error"],"exampleFix":"// before\nstep.init(...); // repository not connected\n// after\nif (rep != null && rep.isConnected()) {\n  step.init(...);\n} else {\n  rep.connect(user, pass);\n  step.init(...);\n}","handlingStrategy":"try-catch","validationCode":"if (rep == null || !rep.isConnected()) { throw new IllegalStateException(\"Repository connection required by GetRepositoryNames step\"); }","typeGuard":null,"tryCatchPattern":"try { ok = step.init(beforeTrans); } catch (KettleException e) { log.error(\"Repository object listing failed; check connection/directory/permissions\", e); return false; }","preventionTips":["Run repository-dependent steps only with an active repository session","Verify the configured directory path exists in the repository","Confirm the repository user can list objects in target directories","Re-authenticate before long-running executions to avoid expired sessions"],"tags":["repository","enumeration","initialization"],"backgroundTag":"api-request-failed","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"}