ERROR [org.camunda.bpm.engine.context] (default task-24) ENGINE-16004 Exception while closing command context:
Error while evaluating expression: ${mail.getText()}.
Cause: Cannot deserialize object in variable ‘mail’: ENGINE-09017 Cannot load class ‘org.camunda.bpm.extension.mail.dto.Mail’: org.camunda.bpm.extension.mail.dto.Mail from [Module “deployment.camunda-bpm-mail.example.pizza-1.3.0-SNAPSHOT.war:main” from Service Module Loader]:
org.camunda.bpm.engine.ProcessEngineException: Error while evaluating expression: ${mail.getText()}.
Cause: Cannot deserialize object in variable ‘mail’: ENGINE-09017 Cannot load class ‘org.camunda.bpm.extension.mail.dto.Mail’: org.camunda.bpm.extension.mail.dto.Mail from [Module “deployment.camunda-bpm-mail.example.pizza-1.3.0-SNAPSHOT.war:main” from Service Module Loader]
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:66)
…
Caused by: org.camunda.bpm.engine.ProcessEngineException: Cannot deserialize object in variable ‘mail’: ENGINE-09017 Cannot load class ‘org.camunda.bpm.extension.mail.dto.Mail’: org.camunda.bpm.extension.mail.dto.Mail from [Module “deployment.camunda-bpm-mail.example.pizza-1.3.0-SNAPSHOT.war:main” from Service Module Loader]
at org.camunda.bpm.engine.impl.variable.serializer.AbstractSerializableValueSerializer.readValue(AbstractSerializableValueSerializer.java:81)
…
Caused by: org.camunda.bpm.engine.ClassLoadingException: ENGINE-09017 Cannot load class ‘org.camunda.bpm.extension.mail.dto.Mail’: org.camunda.bpm.extension.mail.dto.Mail from [Module “deployment.camunda-bpm-mail.example.pizza-1.3.0-SNAPSHOT.war:main” from Service Module Loader]
at org.camunda.bpm.engine.impl.util.EngineUtilLogger.classLoadingException(EngineUtilLogger.java:135)
…
Caused by: java.lang.ClassNotFoundException: org.camunda.bpm.extension.mail.dto.Mail from [Module “deployment.camunda-bpm-mail.example.pizza-1.3.0-SNAPSHOT.war:main” from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
…
I checked and camunda-bpm-mail-core-1.3.0-SNAPSHOT.jar which I built as a part of the example does contain org.camunda.bpm.extension.mail.dto.Mail.class - what could I be missing?
I try to reproduce your issue.
Can you please share your complete log?
Did you follow all instructions? Did you copy the JAR file “camunda-bpm-mail-core-1.2.0.jar” into the module?
What JDK version do you use?
it seems that another module import is missing. Please add the line <module name="org.camunda.bpm.extension.camunda-bpm-mail-core" services="import" />
to the \server\wildfly-10.0.0.Final\modules\org\camunda\bpm\camunda-engine\main\module.xml and try again.
Does this solve the issue?
I came across this issue and resolved it by setting the scope to provided in the maven pom file for the mail bpm and the related java mail libraries. I sue tomcat 8 .
Does this mean I only have to follow this part or I still have to add the dependencies mentioned above that line?
Thanks
My question now is how the mail-config.properties file works?
Do I have to included it both in my application (under src/main/resources/) and also in the server\standalone\configuration\?
Do you know by the way why I get an ERROR when I build my project?
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
(my process is build successfully but in the logs I get this error and I don’t know if it will affect anything).
In the prepackaged distribution I use, I see there was already a folder slf4j under ..server\wildfly-10.1.0.Final\modules\system\layers\base\org
with the following folders:
Also, in the camunda maven project there are the following dependencies in my pom.xml
But once I put the slf4j folder under ..\server\wildfly-10.1.0.Final\modules\org
(as instructed in github for using the mail plugin)
I get the above error.