Highlighted

Version purging in 6.3

Avatar

Avatar

gavyas

Avatar

gavyas

gavyas

29-07-2019

Hi Team,

I working on the Research of version purge in aem 6.3 with oak jar , when ever i ran the version purge in 6.3 with assets and pages am getting failure of version purge, with null point exception error .  Can any one help me on this .

Thanks in advance,

Gavya S

Replies

Highlighted

Avatar

Avatar

Abambo

Avatar

Abambo

Abambo

29-07-2019

Discussion successfully moved from Forum comments to Adobe Experience Manager

Highlighted

Avatar

Avatar

jbrar

Employee

Avatar

jbrar

Employee

jbrar
Employee

29-07-2019

Can share the error stack trace?

Highlighted

Avatar

Avatar

Nirmal_Jose

MVP

Avatar

Nirmal_Jose

MVP

Nirmal_Jose
MVP

29-07-2019

Have you created a version purging configuration at /system/console/configMgr/com.day.cq.wcm.core.impl.VersionPurgeTask

sample one created by maintenance job below  :

Screenshot 2019-07-29 at 15.19.20.png

Highlighted

Avatar

Avatar

Himanshu_Singhal

MVP

Avatar

Himanshu_Singhal

MVP

Himanshu_Singhal
MVP

29-07-2019

Hey,

I didn't get the part of version purging with Oak jar. May be something I don't know.....
But, you can do the version purging using the Purge tool available with in AEM.
http://<server>:<port>/etc/versioning/purge.html

Also, as described in above comment, please make sure to create purge configuration.

Hope this helps.

Highlighted

Avatar

Avatar

gavyas

Avatar

gavyas

gavyas

30-07-2019

Yes, I have created here but nothing is helping out.

Highlighted

Avatar

Avatar

gavyas

Avatar

gavyas

gavyas

30-07-2019

Here the errors :

24.07.2019 05:42:38.011 *INFO* [sling-threadpool-ea8f4f44-aafd-415a-9a60-559c52675a88-(apache-sling-job-thread-pool)-180-Maintenance Queue(com/adobe/granite/maintenance/job/VersionPurgeTask)] com.adobe.granite.repository Service [7327, [org.apache.jackrabbit.oak.api.jmx.SessionMBean]] ServiceEvent UNREGISTERING

24.07.2019 05:42:38.014 *ERROR* [sling-threadpool-ea8f4f44-aafd-415a-9a60-559c52675a88-(apache-sling-job-thread-pool)-180-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=2019/7/24/5/0/6b48f111-8b5a-4c1c-932b-4c7092696d22_0, properties=slingevent:application=6b48f111-8b5a-4c1c-932b-4c7092696d22,jcr:created=java.util.GregorianCalendar(Wed Jul 24 05:00:00 PDT 2019),slingevent:created=java.util.GregorianCalendar(Wed Jul 24 05:00:00 PDT 2019),event.job.queuename=Maintenance Queue,event.job.queued.time=java.util.GregorianCalendar(Wed Jul 24 05:00:00 PDT 2019),jcr:createdBy=sling-event,sling:resourceType=slingevent:Job,event.job.application=6b48f111-8b5a-4c1c-932b-4c7092696d22,event.job.retries=0,event.job.started.time=java.util.GregorianCalendar(Wed Jul 24 05:00:00 PDT 2019),stoppable=false,jcr:primaryType=slingevent:Job,window=granite_weekly,event.job.retrycount=0]

java.lang.NullPointerException: null

at org.apache.jackrabbit.oak.plugins.version.ReadWriteVersionManager.removeVersion(ReadWriteVersionManager.java:210)

at org.apache.jackrabbit.oak.plugins.version.VersionStorageEditor.childNodeDeleted(VersionStorageEditor.java:107)

at org.apache.jackrabbit.oak.spi.commit.CompositeEditor.childNodeDeleted(CompositeEditor.java:135)

at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.childNodeDeleted(VisibleEditor.java:114)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeDeleted(EditorDiff.java:166)

at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:479)

at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)

at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:555)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)

at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:415)

at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)

at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:415)

at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)

at org.apache.jackrabbit.oak.segment.MapRecord$3.childNodeChanged(MapRecord.java:442)

at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:490)

at org.apache.jackrabbit.oak.segment.MapRecord.compareBranch(MapRecord.java:568)

at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:467)

at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:433)

at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)

at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:415)

at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeChanged(EditorDiff.java:148)

at org.apache.jackrabbit.oak.segment.MapRecord$3.childNodeChanged(MapRecord.java:442)

at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:490)

at org.apache.jackrabbit.oak.segment.MapRecord.compare(MapRecord.java:433)

at org.apache.jackrabbit.oak.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:608)

at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)

at org.apache.jackrabbit.oak.spi.commit.EditorHook.processCommit(EditorHook.java:55)

at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)

at org.apache.jackrabbit.oak.plugins.version.VersionHook.processCommit(VersionHook.java:89)

at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)

at org.apache.jackrabbit.oak.spi.commit.CompositeHook.processCommit(CompositeHook.java:61)

at org.apache.jackrabbit.oak.segment.SegmentNodeStore$Commit.prepare(SegmentNodeStore.java:604)

at org.apache.jackrabbit.oak.segment.SegmentNodeStore$Commit.optimisticMerge(SegmentNodeStore.java:634)

at org.apache.jackrabbit.oak.segment.SegmentNodeStore$Commit.execute(SegmentNodeStore.java:690)

at org.apache.jackrabbit.oak.segment.SegmentNodeStore.merge(SegmentNodeStore.java:334)

at org.apache.jackrabbit.oak.core.MutableRoot.commit(MutableRoot.java:249)

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:347)

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.commit(SessionDelegate.java:372)

at org.apache.jackrabbit.oak.jcr.version.ReadWriteVersionManager.removeVersion(ReadWriteVersionManager.java:239)

at org.apache.jackrabbit.oak.jcr.delegate.VersionManagerDelegate.removeVersion(VersionManagerDelegate.java:226)

at org.apache.jackrabbit.oak.jcr.delegate.VersionHistoryDelegate.removeVersion(VersionHistoryDelegate.java:209)

at org.apache.jackrabbit.oak.jcr.version.VersionHistoryImpl$11.performVoid(VersionHistoryImpl.java:240)

at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:274)

at org.apache.jackrabbit.oak.jcr.version.VersionHistoryImpl.removeVersion(VersionHistoryImpl.java:236)

at com.day.cq.wcm.core.impl.VersionManagerImpl.purgeVersions(VersionManagerImpl.java:504)

at com.day.cq.wcm.core.impl.VersionPurgeTask.process(VersionPurgeTask.java:121)

at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293)

at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60)

at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at java.lang.Thread.run(Thread.java:748)

24.07.2019 05:42:38.056 *ERROR* [Thread-34] com.adobe.granite.maintenance.impl.TaskScheduler Maintenance task VersionPurgeTask failed