Skip to main content
Nov 2, 2020 3:55 PM UTC
Solved

Purge final version of an asset

I am attempting to delete all versions(except the root version) of an asset using a task.

I am using VersionHistory API to remove the version.  It works for all of the versions except for the last one. 

 

I keep getting this error: 

OakIntegrity0001: Unable to delete referenced node

Is there a way to remove final version of the asset?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
vish.dhaliwalAccepted solution
Adobe Employee
Nov 5, 2020 4:44 AM UTC

I think it is not possible to delete the base version node that is there in the jcr:baseVersion property of the asset. Removing version via VersionHistory can throw an exception [1]

 

[1] https://docs.adobe.com/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/version/VersionHistory.html#removeVersion(java.lang.String)

4 replies

sunjot16
Adobe Employee
Adobe Employee
Nov 2, 2020 5:23 PM UTC

Cause:

Inconsistencies in oak:index/references. This can be caused by using external methods to modify content in the JCR

 
Solution:
Perform reindex for the synchronous indexes of /oak:index/reference
 
Translate
nick1samAuthor
Nov 2, 2020 5:36 PM UTC
Thank you for your reply! I updated my question to note that I am using VersionHistory API to remove versions. It works for removing all versions except for the last one. What are you referring to when you say "external methods"?
Translate
vish.dhaliwalAdobe EmployeeAccepted solution
Adobe Employee
Nov 5, 2020 4:44 AM UTC

I think it is not possible to delete the base version node that is there in the jcr:baseVersion property of the asset. Removing version via VersionHistory can throw an exception [1]

 

[1] https://docs.adobe.com/docs/en/spec/jsr170/javadocs/jcr-2.0/javax/jcr/version/VersionHistory.html#removeVersion(java.lang.String)

Translate