Expand my Community achievements bar.

SOLVED

Version purging

Avatar

Level 1

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();
                         }

1 Accepted Solution

Avatar

Correct answer by
Administrator

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-manage...

// 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

View solution in original post

1 Reply

Avatar

Correct answer by
Administrator

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-manage...

// 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