cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Engine not picking up properties from activiti.cfg.xml

shil-srini
Champ in-the-making
Champ in-the-making
Hi there,

I'm New to Activiti and Started with the local deployment of activiti after downloading the source. I'm trying out a simple task where a mail can be sent on some condition. I've changed the activiti.cfg.xml in activiti-engine\src\test\resources, It is still taking the default java mail configuration and throwing an error stating mail cannot be sent to localhost port 25.
I've made the following changes in the file activiti-engine\src\test\resources\activiti.cfg.xml:

<bean id="processEngineConfiguration"
    class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
   
    <property name="mailServerHost" value="smtp.gmail.com" />
         <property name="mailServerPort" value="587" />
         <property name="mailServerDefaultFrom" value="xxxx@gmail.com" />
         <property name="mailServerUsername" value="xxxx@gmail.com" />
         <property name="mailServerPassword" value="******" />
          <property name="mailServerUseTLS" value="true" />
          <property name="history" value="full" />
</bean>

I've found a workaround where I modify the engine.properties for mail server settings and the changes are reflected. Though the mailserver changes are reflecting there I'm facing an issue where the useTLS property cannot be set there. Smiley Sad

Could anybody please help?

Thanks.


4 REPLIES 4

shil-srini
Champ in-the-making
Champ in-the-making
The properties added:
<blockcode>


<bean id="processEngineConfiguration"
    class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
   
    <property name="mailServerHost" value="smtp.gmail.com" />
   <property name="mailServerPort" value="587" />
   <property name="mailServerDefaultFrom" value="xxxx@gmail.com" />
   <property name="mailServerUsername" value="xxxx@gmail.com" />
   <property name="mailServerPassword" value="******" />
      <property name="mailServerUseTLS" value="true" />
      <property name="history" value="full" />
<blockcode>

jbarrez
Star Contributor
Star Contributor
that looks allright. And you say it's still using port 25? You are sure this config is picked up?

shil-srini
Champ in-the-making
Champ in-the-making
No. The configuration is not being picked up. That's the problem. I changed the configuration, built and deployed it on server again.
But the port value and host does not seem to change. Is there anything else I'm missing out?

jbarrez
Star Contributor
Star Contributor
> No. The configuration is not being picked up.

How can you be sure? Did you for example change the db properties to make bootup fail?

The properties you pasted above are correct from the looks of it.
Where is the config file placed?