Expand my Community achievements bar.

SOLVED

AEM 6.5.11 workflow participant step can't send email.

Avatar

Level 2

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."

 

waters123_0-1679306447179.png

waters123_1-1679306561075.png

 

 

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!

1 Accepted Solution

Avatar

Correct answer by
Level 2

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"

View solution in original post

4 Replies

Avatar

Level 5

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

Avatar

Community Advisor

It seems you need to configure smtp server in aem.

https://experienceleague.adobe.com/docs/experience-manager-65/communities/administer/email.html?lang...
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.

Avatar

Correct answer by
Level 2

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"