Version purging | Community
Skip to main content
SuN_na
February 4, 2016
Solved

Version purging

  • February 4, 2016
  • 1 reply
  • 570 views

Can someone help me on this version purging.

An exception occurred.javax.jcr.UnsupportedRepositoryOperationException: Unable to perform a versionin
g operation on a non versionable node:

---------------> Property value is mix:versionable

                            jcr:mixinTypes : mix:versionable

---------------->I got the location of version within repository.

                            /jcr:system/jcr:versionStorage/1a/e2/89/1ae28913-6a81-49c5-83e6-dd6832c18387/1.0      where uuid= 1ae28913-6a81-49c5-83e6-dd6832c18387

Here is the code.

 result = qm.createQuery(xpath, javax.jcr.query.Query.XPATH).execute();

                  iter = result.getNodes();
            
                             while (iter.hasNext()) {
                         node = iter.nextNode();
                         path = node.getPath();
                        try {
                            mgr = session.getWorkspace().getVersionManager();
                         } catch (UnsupportedRepositoryOperationException e4) {
                            e4.printStackTrace();
                         } catch (RepositoryException e4) {
                            e4.printStackTrace();
                         }
                         try {
                                // get version history
                               //vh = (VersionHistory) node.getParent().getParent();
                        
                               vh = mgr.getVersionHistory(path);//exception -UnsupportedRepositoryOperationException 
                                          } catch (UnsupportedRepositoryOperationException e3) {
                            e3.printStackTrace();
                         }

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Hi

Please have a look at this slimier post answering your question.

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__ukhq-can_you_pleaseshare.html

// This post talks about Version purging and also how to rectify the issue you are getting.

    The versionable mixin is applied on jcr:content node whereas in your code you are trying to do the operation on mm1 node which may not have the mixin. 

~kautuk

1 reply

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
October 18, 2016

Hi

Please have a look at this slimier post answering your question.

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manager.topic.html/forum__ukhq-can_you_pleaseshare.html

// This post talks about Version purging and also how to rectify the issue you are getting.

    The versionable mixin is applied on jcr:content node whereas in your code you are trying to do the operation on mm1 node which may not have the mixin. 

~kautuk

Kautuk Sahni