Domanda

I try to send mail with only BPMN 2.0 and not with DelegateTask or a listener.

I tried this :

<bpmn2:serviceTask id="ServiceTask_1" name="mailService" camunda:type="mail">
  <bpmn2:extensionElements>
    <camunda:field name="to" stringValue="test@test.com" />
    <camunda:field name="subject" expression="Hello" />
    <camunda:field name="html" expression="Hello" />
   </bpmn2:extensionElements>
</bpmn2:serviceTask>

But it fail :

Caused by: org.camunda.bpm.engine.ClassLoadingException: Could not load class: org.camunda.bpm.engine.impl.bpmn.behavior.MailActivityBehavior
    at org.camunda.bpm.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:85)
    at org.camunda.bpm.engine.impl.util.ReflectUtil.instantiate(ReflectUtil.java:147)
    ... 43 more
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/mail/EmailException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at org.camunda.bpm.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:65)
    ... 44 more
Caused by: java.lang.ClassNotFoundException: org.apache.commons.mail.EmailException

I've also add mail-1.5.0.jar, commons-emails-1.2.jar and commons-logging-1.jar to $CAMUNDA_HOME/server/apache-tomcat-*/lib.

I work with Camunda 7.1.0-Final on Tomcat server.

È stato utile?

Soluzione

In which lib folder did you add the commons-emails-1.2.jar etc?

If you copied them to the lib folder in $CAMUNDA_HOME (the directory where also the start-camunda.sh file exists) then please move them to the lib folder of the application server (e.g. $CAMUNDA_HOME/server/apache-tomcat-7.0.50/lib/).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top