{"record":{"id":"a3bad0cf7d152982","repo":"pentaho/pentaho-kettle","slug":"could-not-retrieve-version-history-of-object-with-path","errorCode":null,"errorMessage":"Could not retrieve version history of object with path [${absPath}]","messagePattern":"Could not retrieve version history of object with path \\[(.+?)\\]","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/UnifiedRepositoryRevisionService.java","lineNumber":53,"sourceCode":"\n  @Override\n  public List<ObjectRevision> getRevisions( final RepositoryElementInterface element ) throws KettleException {\n    return getRevisions( element.getObjectId() );\n  }\n\n  @Override\n  public List<ObjectRevision> getRevisions( ObjectId fileId ) throws KettleException {\n    String absPath = null;\n    try {\n      List<ObjectRevision> versions = new ArrayList<ObjectRevision>();\n      List<VersionSummary> versionSummaries = unifiedRepository.getVersionSummaries( fileId.getId() );\n      for ( VersionSummary versionSummary : versionSummaries ) {\n        versions.add( new PurObjectRevision( versionSummary.getId(), versionSummary.getAuthor(), versionSummary\n            .getDate(), versionSummary.getMessage() ) );\n      }\n      return versions;\n    } catch ( Exception e ) {\n      throw new KettleException( \"Could not retrieve version history of object with path [\" + absPath + \"]\", e );\n    }\n  }\n\n  @Override\n  public void restoreJob( ObjectId id_job, String revision, String versionComment ) throws KettleException {\n    unifiedRepository.restoreFileAtVersion( id_job.getId(), revision, versionComment );\n    rootRef.clearRef();\n  }\n\n  @Override\n  public void restoreTransformation( ObjectId id_transformation, String revision, String versionComment )\n    throws KettleException {\n    unifiedRepository.restoreFileAtVersion( id_transformation.getId(), revision, versionComment );\n    rootRef.clearRef();\n  }\n\n}\n","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/UnifiedRepositoryRevisionService.java#L35-L71","documentation":"UnifiedRepositoryRevisionService.getRevisions asks the unified repository for the version history of a file at absPath and converts each VersionSummary into a PurObjectRevision. Any exception during retrieval is wrapped in this KettleException with the object's path in the message. It means version history could not be read for that object.","triggerScenarios":"Calling getRevisions (directly or via job/transformation revision lookups) for a path that doesn't exist, is not versionable (versioning disabled for that location), or when the underlying unifiedRepository.getVersions call fails.","commonSituations":"Requesting history for an object that was deleted or renamed, repositories with versioning disabled, permission errors on the file, or server-side version store issues in Jackrabbit.","solutions":["Verify the object path exists and the user has read access before requesting revisions.","Enable versioning for the repository location/file type if history was expected.","Check the wrapped cause (getCause()) to distinguish not-found vs. server errors.","If the object was deleted, look for it in the repository trash or restore it first."],"exampleFix":"// before\nList<ObjectRevision> revs = revisionService.getRevisions( repository, path ); // may throw\n// after\ntry {\n  List<ObjectRevision> revs = revisionService.getRevisions( repository, path );\n} catch ( KettleException e ) {\n  if ( repository.exists( path, null ) ) {\n    throw e; // genuine server error, rethrow\n  }\n  revs = Collections.emptyList(); // object absent: no history available\n}","handlingStrategy":"try-catch","validationCode":"if ( repository.exists( absPath, null ) ) {\n  List<ObjectRevision> revs = revisionService.getRevisions( repository, absPath );\n}","typeGuard":null,"tryCatchPattern":"try {\n  versions = revisionService.getRevisions( repository, absPath );\n} catch ( KettleException e ) {\n  logWarn( \"No revision history for \" + absPath + \": \" + e.getCause() );\n  versions = Collections.emptyList();\n}","preventionTips":["Confirm versioning is enabled for the repository and file types","Check file existence before requesting history","Verify read permissions on the target path","Treat empty history as normal for non-versioned locations"],"tags":["versioning","repository","pentaho-kettle"],"backgroundTag":"resource-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"}