I am getting below error while running the PreUpgradeTask by invoking runAllPreUpgradeTasks() method :
com.day.cq.wcm.core.impl.VersionManagerImpl Unable to purge version 1.* for /<path> : OakConstraint0100: Item is protected: <path>
What could be the possible reason and solution?
Download the Groovy jar from  and execute the script mentioned at  to resolve this issue.
 Central Repository: org/codehaus/groovy/groovy-all/2.1.9
 [OAK-5193] Version tree may become inconsistent after removing a version - ASF JIRA