Upload the attached OAK-5193-fix-*.groovy script to the AEM server
Issue
During version purging we see warnings like the one below in the logs.
02.05.2017 16:52:53.579 *WARN* [sling-threadpool-713f76d9-68c5-4038-844f-eee72060cf5c-(apache-sling-job-thread-pool)-83-Maintenance Queue(com/adobe/granite/maintenance/job/VersionPurgeTask)] org.apache. jackrabbit.oak.plugins.version.ReadOnlyVersionManager Missing versionable path property for crx.default at /jcr:system/jcr:versionStorage/5f/d1/98/5fd198fd-6dfc-4802-b496-fbe3569525be
Cause
This is a known issue and caused by repository migration. Applies to AEM 6.x, please also review - OAK-5193.
Resolution
To fix the issue, follow these steps:
-
-
Download the oak-run version matching the version of oak-core bundle you have in the /system/console/bundles UI
-
Stop AEM
-
Run this command as the user that owns the AEM java process
java -Xmx2048m -jar oak-run-1.4.*.jar console crx-quickstart/repository/segmentstore ":load OAK-5193-fix.groovy" >> /tmp/script.log 2>&1 &'
ملاحظة:On Oak 1.6 and later versions you must add the read-write parameter when running this command:
java -Xmx2048m -jar oak-run-1.4.*.jar --read-write console crx-quickstart/repository/segmentstore ":load OAK-5193-fix.groovy" >> /tmp/script.log 2>&1 &'
-
Once the script is completed then review the generated file /tmp/script.log
-
Start AEM
-
Run version purging and the errors should be gone
The another way to execute OAK-5193-fix-v4.groovy through Apache Felix Web Console Script Console:
20.11.2018 19:04:50.707 *ERROR* [sling-threadpool-d7508be6-0e5f-4c9c-9a9e-83eeb146d593-(apache-sling-job-thread-pool)-3-Maintenance Queue(com/adobe/granite/maintenance/job/VersionPurgeTask)] org.apache.sling.event.impl.jobs.queues.JobQueueImpl.Maintenance Queue Unhandled error occured in job processor null while processing job Sling Job [topic=com/adobe/granite/maintenance/job/VersionPurgeTask, id=2018/11/20/17/28/89c27034-65df-4b30-ad99-0bb80abf59fb_1, properties=slingevent:application=89c27034-65df-4b30-ad99-0bb80abf59fb,jcr:created=java.util.GregorianCalendar(Tue Nov 20 17:28:14 UTC 2018),slingevent:created=java.util.GregorianCalendar(Tue Nov 20 17:28:14 UTC 2018),event.job.queuename=Maintenance Queue,event.job.queued.time=java.util.GregorianCalendar(Tue Nov 20 17:28:14 UTC 2018),jcr:createdBy=admin,sling:resourceType=slingevent:Job,event.job.application=89c27034-65df-4b30-ad99-0bb80abf59fb,event.job.retries=1,event.job.started.time=java.util.GregorianCalendar(Tue Nov 20 17:28:14 UTC 2018),jcr:primaryType=slingevent:Job,event.job.retrycount=0] java.lang.NullPointerException: null at org.apache.jackrabbit.oak.plugins.version.ReadWriteVersionManager.removeVersion(ReadWriteVersionManager.java:205) at org.apache.jackrabbit.oak.plugins.version.VersionStorageEditor.childNodeDeleted(VersionStorageEditor.java:107) at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.childNodeDeleted(CompositeEditor.java:135)
-
Download the Apache Felix Web Console Script Console Plugin [1]
-
Download the Groovy bundle [2]
-
Manually install the Apache Felix Web Console Script Console
-
Manually install the Groovy bundle in the same manner
-
Confirm that both the bundles have started
-
Whitelist org.apache.felix.webconsole.plugins.scriptconsole for login admin
-
Navigate to the script console - /system/console/sc
-
Select Groovy from the drop down
-
Paste the contents of OAK-5193-fix-v4.groovy into the console and select Execute
[1] http://www-eu.apache.org/dist//felix/org.apache.felix.webconsole.plugins.scriptconsole-1.0.2.jar
[2] http://repo1.maven.org/maven2/org/codehaus/groovy/groovy-all/2.1.6/groovy-all-2.1.6.jar