AEM 6.5.11 workflow participant step can't send email. | Community
Skip to main content
Level 2
March 20, 2023
Solved

AEM 6.5.11 workflow participant step can't send email.

  • March 20, 2023
  • 3 replies
  • 1347 views

Hi guys,

 

My AEM version is 6.5.11.

I created a workflow only contains participant step, selected a group and checked the "Notify user via email."

 

 

 

when I started the workflow, it will throw error and email sent fail:

 

*ERROR* [FelixDispatchQueue] org.apache.felix.eventadmin FrameworkEvent ERROR (org.osgi.framework.ServiceException: Service factory returned null. (Component: com.day.cq.workflow.impl.email.EMailNotificationService (3295)))
org.osgi.framework.ServiceException: Service factory returned null. (Component: com.day.cq.workflow.impl.email.EMailNotificationService (3295))
at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:381)
at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
at org.apache.felix.framework.Felix.getService(Felix.java:3954)
at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.obtain(EventHandlerProxy.java:286)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:407)
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104)
at org.apache.felix.eventadmin.impl.handler.EventAdminImpl.sendEvent(EventAdminImpl.java:147)
at org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.sendEvent(EventAdminSecurityDecorator.java:96)
at com.day.cq.workflow.compatibility.CQEventDispatcher.handleEvent(CQEventDispatcher.java:83)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
*ERROR* [EventAdminAsyncThread #2] com.day.cq.workflow.cq-workflow-impl bundle com.day.cq.workflow.cq-workflow-impl:6.3.8.CQ652-B0003 (486)[com.day.cq.workflow.impl.email.EMailNotificationService(3295)] : The activate method has thrown an exception (java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean)
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
at com.day.cq.workflow.impl.email.EMailNotificationService.activate(EMailNotificationService.java:447)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:242)
at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:678)
at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:524)
at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:318)
at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:308)
at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:342)
at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115)
at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:984)
at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:957)
at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:902)
at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:348)
at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:248)
at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350)
at org.apache.felix.framework.Felix.getService(Felix.java:3954)
at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:450)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.obtain(EventHandlerProxy.java:286)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:407)
at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104)
at org.apache.felix.eventadmin.impl.handler.EventAdminImpl.sendEvent(EventAdminImpl.java:147)
at org.apache.felix.eventadmin.impl.security.EventAdminSecurityDecorator.sendEvent(EventAdminSecurityDecorator.java:96)
at com.day.cq.workflow.compatibility.CQEventDispatcher.handleEvent(CQEventDispatcher.java:83)

 

 

Can anyone help me?

 

Thank you in advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by waters123

The error is "java.lang.String cannot be cast to java.lang.Boolean", it is caused by my config file "com.day.cq.workflow.impl.email.EMailNotificationService.config".

 

Error config:

notify.onabort="true"
notify.oncomplete="true"
notify.oncontainercomplete="true"
notify.useronly="false"
 
Correct config:
notify.onabort=B"true"
notify.oncomplete=B"true"
notify.oncontainercomplete=B"true"
notify.useronly=B"false"

3 replies

Level 4
March 20, 2023

Do you have an SMTP server set up in the Day CQ Mail Service Configuration?

waters123Author
Level 2
March 21, 2023

The SMTP is correct, I can send email when submit form.

DPrakashRaj
Community Advisor
Community Advisor
March 20, 2023

It seems you need to configure smtp server in aem.

https://experienceleague.adobe.com/docs/experience-manager-65/communities/administer/email.html?lang=en#
you might need to reach out to your network team for the configuration related to your organization for configuring this if you will be using your organization email server.

waters123AuthorAccepted solution
Level 2
April 14, 2023

The error is "java.lang.String cannot be cast to java.lang.Boolean", it is caused by my config file "com.day.cq.workflow.impl.email.EMailNotificationService.config".

 

Error config:

notify.onabort="true"
notify.oncomplete="true"
notify.oncontainercomplete="true"
notify.useronly="false"
 
Correct config:
notify.onabort=B"true"
notify.oncomplete=B"true"
notify.oncontainercomplete=B"true"
notify.useronly=B"false"