{"record":{"id":"080f926c926671f2","repo":"pentaho/pentaho-kettle","slug":"unable-to-get-all-transformation-names","errorCode":null,"errorMessage":"Unable to get all transformation names","messagePattern":"Unable to get all transformation names","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java","lineNumber":1756,"sourceCode":"      String path = repositoryDirectory != null ? repositoryDirectory.toString() : \"null\";\n      throw new IdNotFoundException( \"Unable to get ID for job [\" + name + \"]\", e, name, path,\n        RepositoryObjectType.TRANSFORMATION );\n    }\n  }\n\n  @Override\n  public String[] getTransformationNames( ObjectId idDirectory, boolean includeDeleted ) throws KettleException {\n    try {\n      List<RepositoryFile>\n        children =\n        getAllFilesOfType( idDirectory, RepositoryObjectType.TRANSFORMATION, includeDeleted );\n      List<String> names = new ArrayList<String>();\n      for ( RepositoryFile file : children ) {\n        names.add( file.getTitle() );\n      }\n      return names.toArray( new String[0] );\n    } catch ( Exception e ) {\n      throw new KettleException( \"Unable to get all transformation names\", e );\n    }\n  }\n\n  @Override\n  public List<RepositoryElementMetaInterface> getTransformationObjects( ObjectId idDirectory, boolean includeDeleted )\n    throws KettleException {\n    return getPdiObjects( idDirectory, Arrays\n      .asList( new RepositoryObjectType[] { RepositoryObjectType.TRANSFORMATION } ), includeDeleted );\n  }\n\n  protected List<RepositoryElementMetaInterface> getPdiObjects( ObjectId dirId, List<RepositoryObjectType> objectTypes,\n                                                                boolean includeDeleted ) throws KettleException {\n\n    readWriteLock.readLock().lock();\n    try {\n      RepositoryFile dirFile;\n      dirFile = pur.getFileById( dirId.getId() );\n","sourceCodeStart":1738,"sourceCodeEnd":1774,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java#L1738-L1774","documentation":"PurRepository.getTransformationNames() lists transformation titles in a directory and wraps any failure of the pur listing call in this KettleException. The cause chain contains the real repository error.","triggerScenarios":"Calling getTransformationNames(idDirectory, includeDeleted) when getChildren fails: invalid/deleted directory id, lost repository connection, server error, or permission denial.","commonSituations":"Stale session after Pentaho server restart; directory deleted concurrently; wrong directory id passed from another repository; network failure; insufficient read permissions.","solutions":["Log e.getCause() to identify connection vs permission vs missing-directory failure.","Reconnect to the repository and retry.","Validate the directory id via getDirectory(idDirectory) before listing.","Check server reachability and user read permissions on the folder."],"exampleFix":"// before\nString[] names = repo.getTransformationNames(dirId, false);\n// after\ntry {\n  String[] names = repo.getTransformationNames(dirId, false);\n} catch (KettleException e) {\n  log.error(\"transformation listing failed\", e.getCause());\n  reconnectIfNeeded();\n}","handlingStrategy":"try-catch","validationCode":"if (repo == null || !repo.isConnected()) throw new IllegalStateException(\"repository not connected\");\nif (dirId == null) throw new IllegalArgumentException(\"dirId required\");","typeGuard":"boolean usable(Repository repo) { try { return repo != null && repo.isConnected(); } catch (Throwable t) { return false; } }","tryCatchPattern":"try { return repo.getTransformationNames(dirId, false); } catch (KettleException e) { log.error(\"cause: \", e.getCause()); return new String[0]; }","preventionTips":["Re-resolve directories by path, not cached ids","Handle server restarts by reconnecting","Check user read permissions on the folder"],"tags":["kettle","repository","pur","metadata-listing"],"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"}