AnsweredAssumed Answered

Mail Task Fails to Execute using Activiti Rest Service

Question asked by softcoder on Nov 13, 2014
Latest reply on Jun 15, 2016 by imsrk
Hi,
I have a workflow that contains a mail task. Prior to adding the mail task, user tasks and service tasks have been executing well. Upon adding mail tasks, i get the exception added below.
My best guess is my mail conffiguration is wrong.
I have tried:
1- Creating a activiti-cfg.jar which contains activiti.cfg.xml with my appropriate mail config and putting it in my tomcat/lib and build path of the activiti-rest app. Doesn't work.
2- Creating mail.properties file in my class path with appropriate mail config. Doesn't work.
3- Creating activiti-standalone-context.xml contaning the mail config in rest and explorer app. Doesn't work.
4- Putting activiti.cfg.xml in the build path of my explorer and rest app. Doesn't work.

I am using Activiti v5.16.4.
Any Suggestions?

SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/activiti-rest] threw exception [Request processing failed; nested exception is org.activiti.engine.ActivitiException: Could not send e-mail in execution 102529] with root cause
java.net.ConnectException: Connection refused: connect
   at java.net.DualStackPlainSocketImpl.connect0(Native Method)
   at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
   at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
   at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
   at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
   at java.net.PlainSocketImpl.connect(Unknown Source)
   at java.net.SocksSocketImpl.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at java.net.Socket.connect(Unknown Source)
   at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
   at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
   at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359)
   at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
   at javax.mail.Service.connect(Service.java:288)
   at javax.mail.Service.connect(Service.java:169)
   at javax.mail.Service.connect(Service.java:118)
   at javax.mail.Transport.send0(Transport.java:188)
   at javax.mail.Transport.send(Transport.java:118)
   at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232)
   at org.apache.commons.mail.Email.send(Email.java:1267)
   at org.activiti.engine.impl.bpmn.behavior.MailActivityBehavior.execute(MailActivityBehavior.java:83)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:

Outcomes