We just upgraded from AEM6.1 to 6.3. I am trying to execute a workflow but getting the below error-
07.08.2017 15:20:21.233 *ERROR* [sling-threadpool-cc7c6ae7-7243-4db2-9490-b0810d422592-(apache-sling-job-thread-pool)-282-Granite Workflow Queue(com/adobe/granite/workflow/job/etc/workflow/models/content-request-for-deletion/jcr_content/model)] com.adobe.granite.repository.impl.SlingRepositoryImpl Bundle com.adobe.granite.workflow.core is NOT whitelisted to use SlingRepository.loginAdministrative
07.08.2017 15:20:21.233 *ERROR* [sling-threadpool-cc7c6ae7-7243-4db2-9490-b0810d422592-(apache-sling-job-thread-pool)-282-Granite Workflow Queue(com/adobe/granite/workflow/job/etc/workflow/models/content-request-for-deletion/jcr_content/model)] com.adobe.granite.workflow.core.job.JobHandler Error executing workflow step
java.lang.RuntimeException: Error logging in as service user
at com.adobe.granite.workflow.core.util.ServiceLoginUtil.getWorkflowPayloadSession(ServiceLoginUtil.java:82)
at com.adobe.granite.workflow.core.util.ServiceLoginUtil.getWorkflowPayloadWorkflowSession(ServiceLoginUtil.java:127)
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:203)
at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:500)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:291)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:58)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:227)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.jcr.LoginException: Bundle com.adobe.granite.workflow.core is NOT whitelisted
at org.apache.sling.jcr.base.AbstractSlingRepository2.loginAdministrative(AbstractSlingRepository2.java:378)
at com.adobe.granite.workflow.core.util.ServiceLoginUtil.getWorkflowPayloadSession(ServiceLoginUtil.java:76)
... 9 common frames omitted
Do I need to create a service user? How can I do so?
You will find useful this link https://issues.apache.org/jira/browse/SLING-5135 loginAdministrative is a deprecated method which you can still use, although in 6.3 an extra security level was added so in order to be able to use it you would need to create an OSGi config org.apache.sling.jcr.base.internal.LoginAdminWhitelist.fragment More info here