cancel
Showing results for 
Search instead for 
Did you mean: 

External mailserver configuration in activiti-explorer and tomcat

werners
Champ in-the-making
Champ in-the-making
Hi all,
I hope that my question was not asked already twice or even more often.

In Activiti 5.14 i am trying to enable the activiti mail function in combination with our exchange server and a local postgresql database.
First i configured the properties in the activity.cfg.xml and run the email example in eclipse and JVM.

<property name="mailServerHost" value="192.168.1.10" />
<property name="mailServerPort" value="26" />


…and everything works as expected.

Later i tried to configure these both setting inside tomcat and the activiti-explorer with edtiting the "activiti-standalone-context.xml"

<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean" destroy-method="destroy">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
<property name="mailServerPort" value="26"/>
<property name="mailServerHost" value="192.168.1.10"/>
</bean>

When i start tomcat again, i got following exception, and the activiti-explorer didn't start up.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine' defined in ServletContext resource [/WEB-INF/activiti-standalone-context.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'mailServerPort' of bean class [org.activiti.spring.ProcessEngineFactoryBean]: Bean property 'mailServerPort' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396)

Can someone give me some advice what I have done wrong?

Thank you much.
2 REPLIES 2

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Werner,

mailServer is set in processEngineConfiguration.
e.g.


  <bean id="processEngineConfiguration"
    class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">

    <property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
    <property name="jdbcDriver" value="org.h2.Driver" />
    <property name="jdbcUsername" value="sa" />
    <property name="jdbcPassword" value="" />

    <!– Database configurations –>
    <property name="databaseSchemaUpdate" value="drop-create" />

    <!– job executor configurations –>
    <property name="jobExecutorActivate" value="false" />

    <!– mail server configurations –>
    <property name="mailServerPort" value="5025" />
    <property name="history" value="full" />
  </bean>

Could you try to move port to the processEngineConfiguration bean?

Regards
Martin

werners
Champ in-the-making
Champ in-the-making
Hi Martin,
i moved the property tags to the processEngineConfiguration-Bean and it works now.
Many thanks for your help!