AnsweredAssumed Answered

Problem with email task using google account

Question asked by holysoul on Oct 16, 2013
Latest reply on Oct 16, 2013 by martin.grofcik
Hi all.
I have just test a simple email task with configuration for google account.
I add config to activiti.cfg.xml like that


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">

   <bean id="processEngineConfiguration"
      class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
      <!– Database configurations –>
      <property name="databaseType" value="h2" />
      <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="" />

      <property name="databaseSchemaUpdate" value="true"></property>
      <property name="jobExecutorActivate" value="false" />

      <property name="mailServerHost" value="smtp.gmail.com" />
      <property name="mailServerPort" value="465" />
      <property name="mailServerUsername" value="xxx@gmail.com" />
      <property name="mailServerPassword" value="xxx" />
      <property name="mailServerDefaultFrom" value="xxx@gmail.com" />
      <property name="mailServerUseSSL" value="true"/>
   </bean>

</beans>


Then I got an error:


SEVERE: Exception while initializing process engine :Error creating bean with name 'processEngineConfiguration' defined in resource loaded through InputStream: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'mailServerUseSSL' of bean class [org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration]: Bean property 'mailServerUseSSL' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngineConfiguration' defined in resource loaded through InputStream: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'mailServerUseSSL' of bean class [org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration]: Bean property 'mailServerUseSSL' 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:1353)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
   at org.activiti.engine.impl.cfg.BeansConfigurationHelper.parseProcessEngineConfiguration(BeansConfigurationHelper.java:36)
   at org.activiti.engine.impl.cfg.BeansConfigurationHelper.parseProcessEngineConfigurationFromInputStream(BeansConfigurationHelper.java:43)
   at org.activiti.engine.ProcessEngineConfiguration.createProcessEngineConfigurationFromInputStream(ProcessEngineConfiguration.java:164)
   at org.activiti.engine.ProcessEngineConfiguration.createProcessEngineConfigurationFromInputStream(ProcessEngineConfiguration.java:160)
   at org.activiti.engine.ProcessEngines.buildProcessEngine(ProcessEngines.java:176)
   at org.activiti.engine.ProcessEngines.initProcessEnginFromResource(ProcessEngines.java:150)
   at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:88)
   at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:207)
   at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:200)
   at org.bpmnwithactiviti.chapter1.SimpleProcessTest.startBookOrder(SimpleProcessTest.java:17)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
   at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
   at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
   at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
   at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
   at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
   at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
   at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
   at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'mailServerUseSSL' of bean class [org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration]: Bean property 'mailServerUseSSL' 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.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1016)
   at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:896)
   at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76)
   at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1350)
   … 39 more



Someone please give some advices, I have no clue, or what should I do to use google account with email task.

Outcomes