{"record":{"id":"ad84aec2a65c5b82","repo":"pentaho/pentaho-kettle","slug":"repository-does-not-support-revisions","errorCode":null,"errorMessage":"Repository does not support revisions","messagePattern":"Repository does not support revisions","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"plugins/pur/core/src/main/java/org/pentaho/di/ui/repository/pur/repositoryexplorer/controller/RevisionController.java","lineNumber":187,"sourceCode":"            UIRepositoryObjectRevisions revisions = null;\n            try {\n              UIRepositoryContent rc = (UIRepositoryContent) ro.get( 0 );\n              if ( rc instanceof IRevisionObject ) {\n                Boolean versioningEnabled = ( (IRevisionObject) rc ).getVersioningEnabled();\n                // Show/hide the Verison History tab\n                historyTab.setVisible( versioningEnabled );\n                if ( !versioningEnabled ) {\n                  return new UIRepositoryObjectRevisions();\n                }\n                Boolean versionCommentEnabled = ( (IRevisionObject) rc ).getVersionCommentEnabled();\n\n                // Show/Hide the version comment column\n                setRevisionTableColumns( versionCommentEnabled );\n\n                revisions = ( (IRevisionObject) rc ).getRevisions();\n\n              } else {\n                throw new IllegalStateException( BaseMessages.getString( PKG,\n                    \"RevisionsController.RevisionsNotSupported\" ) ); //$NON-NLS-1$\n              }\n            } catch ( KettleException e ) {\n              if ( mainController == null || !mainController.handleLostRepository( e ) ) {\n                // convert to runtime exception so it bubbles up through the UI\n                throw new RuntimeException( e );\n              }\n            }\n\n            return revisions;\n          }\n\n          @Override\n          public List<UIRepositoryObject> targetToSource( UIRepositoryObjectRevisions elements ) {\n            return null;\n          }\n        } );\n","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pur/core/src/main/java/org/pentaho/di/ui/repository/pur/repositoryexplorer/controller/RevisionController.java#L169-L205","documentation":"RevisionController.sourceToTarget throws this IllegalStateException when the currently connected repository does not implement IRevisionObject, meaning the repository backend has no revision/version history support. The controller checks `instanceof IRevisionObject` after connecting and refuses to build the revisions UI panel for repositories lacking it. This bubbles to the UI as a RuntimeException.","triggerScenarios":"Calling sourceToTarget (the UI browser controller's repository-change callback) while connected to a repository whose IRepositoryService/repo does not implement IRevisionObject — e.g. a standard Kettle file or database repository instead of an Enterprise (Pur) repository.","commonSituations":"Opening the revisions view of Spoon against a non-Enterprise repository; connecting to a repository type without versioning enabled; repositories migrated or downgraded from Pentaho Enterprise to community editions.","solutions":["Connect to a Pentaho Enterprise Repository (Pur) that supports revision history via IRevisionObject.","Enable revision support on the repository server if using a Pentaho EE install where it was disabled.","Avoid opening the Revisions panel when the repository lacks revision support; hide the revision UI for unsupported repositories.","Catch the RuntimeException in the UI layer and show a friendly 'revisions not supported' message instead of a stack trace."],"exampleFix":"// before\nrevisions = ((IRevisionObject) rc).getRevisions();\n\n// after\nif ( rc instanceof IRevisionObject ) {\n  revisions = ( (IRevisionObject) rc ).getRevisions();\n} else {\n  // hide revision UI instead of throwing\n  revisionActive = false;\n}","handlingStrategy":"type-guard","validationCode":"boolean revisionsSupported = repository != null && repository.getService() != null && repository.getService().getObject() instanceof IRevisionObject;","typeGuard":"boolean supportsRevisions(Object rc) { return rc instanceof IRevisionObject; }","tryCatchPattern":"try { controller.sourceToTarget(); } catch (RuntimeException e) { if (e.getCause() instanceof KettleException) { showNotSupportedMessage(); } else { throw e; } }","preventionTips":["Only expose the Revisions panel for Pentaho Enterprise repositories.","Check IRevisionObject support before binding the revisions controller.","Feature-detect repository capabilities at connect time and store them in the main controller."],"tags":["repository","revisions","ui","unsupported-repository"],"backgroundTag":"unsupported-operation","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"}