Expand my Community achievements bar.

SOLVED

Lock Payload Process step & Workflow in AEM 6.1

Avatar

Level 2

I have a workflow in AEM 5.6 in which I am using a Lock payload step before Create Version step. This workflow steps allows me to lock the payload in my case a page hence stops it from any authoring change but it allows me to create a version. Works perfectly for 5.6 enviornment.

Now when I created the same workflow model on AEM 6.1. Lock payload step doesn't allow me to create version of the payload. It is throwing an erro payload is locked

Is this the expected behaviour of Lock payload step in 6.1. If yes is there any way I can lock the page and create a version simultaneously.

 

Error thrown

com.adobe.granite.workflow.WorkflowException: Process execution resulted in an error
    at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:194)
    at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:232)
    at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:512)
    at org.apache.sling.event.impl.jobs.queues.JobRunner.run(JobRunner.java:205)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.adobe.granite.workflow.WorkflowException: Failed to execute process
    at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:108)
    at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:184)
    ... 6 more
Caused by: com.day.cq.workflow.WorkflowException: com.day.cq.wcm.api.WCMException: Unable to create version.
    at com.day.cq.wcm.workflow.process.CreateVersionProcess.execute(CreateVersionProcess.java:112)
    at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
    ... 7 more
Caused by: com.day.cq.wcm.api.WCMException: Unable to create version.
    at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1331)
    at com.day.cq.wcm.workflow.process.CreateVersionProcess.execute(CreateVersionProcess.java:84)
    ... 8 more
Caused by: javax.jcr.lock.LockException: Node at */jcr:content is locked
    at org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl.checkNotLocked(VersionManagerImpl.java:378)
    at org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl.access$300(VersionManagerImpl.java:53)
    at org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl$6.perform(VersionManagerImpl.java:337)
    at org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl$6.perform(VersionManagerImpl.java:329)
    at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:216)
    at org.apache.jackrabbit.oak.jcr.version.VersionManagerImpl.checkout(VersionManagerImpl.java:329)
    at org.apache.jackrabbit.oak.jcr.session.NodeImpl.checkout(NodeImpl.java:1076)
    at com.day.cq.wcm.core.impl.PageManagerImpl.createRevision(PageManagerImpl.java:1280)
    ... 9 more

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi

Please try the following thing:-

One of the workaround is by adding -XX:-UseSplitVerifier option to the JVM .

Example, if you’re starting AEM using start.bat, then you need to update JVM options in start.bat file.

::* default JVM options
if not defined CQ_JVM_OPTS set CQ_JVM_OPTS=-Xmx1024m -XX:MaxPermSize=256M -Djava.awt.headless=true -XX:-UseSplitVerifier

Refer to the link:- https://forums.adobe.com/thread/1204006

Note:-  This is the issue with AEM 5.6 and Java 1.7, i hope this will work with 6.1 too.

 

Please refer to Link:- https://docs.adobe.com/docs/en/aem/6-1/author/page-authoring/managing-pages.html for locking and Creating version of pages.

 

I hope this would help.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Correct answer by
Administrator

Hi

Please try the following thing:-

One of the workaround is by adding -XX:-UseSplitVerifier option to the JVM .

Example, if you’re starting AEM using start.bat, then you need to update JVM options in start.bat file.

::* default JVM options
if not defined CQ_JVM_OPTS set CQ_JVM_OPTS=-Xmx1024m -XX:MaxPermSize=256M -Djava.awt.headless=true -XX:-UseSplitVerifier

Refer to the link:- https://forums.adobe.com/thread/1204006

Note:-  This is the issue with AEM 5.6 and Java 1.7, i hope this will work with 6.1 too.

 

Please refer to Link:- https://docs.adobe.com/docs/en/aem/6-1/author/page-authoring/managing-pages.html for locking and Creating version of pages.

 

I hope this would help.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 2

Thanks for the repsones, but I already have this -XX:-UseSplitVerifier in my start.bat file. Also the issue is I am allowed to lock the pageand create version of it on 5.6 but not on 6.1

Avatar

Level 1

I have the same problem. But the official "Solved" reply doesn't resolve any issue.