AnsweredAssumed Answered

Mail action User does not exists :  System

Question asked by nikes on Oct 21, 2011
Latest reply on Nov 3, 2011 by nikes
Hello all,

I have wriiten a Java scheduler which sends an email to some list of users using ActionService for mail.

The code runs fine and sends email for Alfresco 3.2.r EE but fails for Alfresco 3.4.3 EE

Following is the exception stacktrace from alfresco.log


19:50:00,299 ERROR [org.alfresco.repo.action.executer.MailActionExecuter] Failed to send email to myaddress@domain.com
org.springframework.mail.MailPreparationException: Could not prepare mail; nested exception is org.alfresco.service.cmr.security.NoSuchPersonException: 09210005 User does not exist and could not be created: System
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:368)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:345)
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:461)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:196)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy208.execute(Unknown Source)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:780)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:700)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:538)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:524)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:789)
   at com.saintgobain.sgsi.alfresco.action.DocumentExpiryNotificationJob.sendNotification(DocumentExpiryNotificationJob.java:312)
   at com.saintgobain.sgsi.alfresco.action.DocumentExpiryNotificationJob.execJob(DocumentExpiryNotificationJob.java:213)
   at com.saintgobain.sgsi.alfresco.action.DocumentExpiryNotificationJob$1.execute(DocumentExpiryNotificationJob.java:85)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:253)
   at com.saintgobain.sgsi.alfresco.action.DocumentExpiryNotificationJob.execute(DocumentExpiryNotificationJob.java:91)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: org.alfresco.service.cmr.security.NoSuchPersonException: 09210005 User does not exist and could not be created: System
   at org.alfresco.repo.security.person.PersonServiceImpl.getPersonImpl(PersonServiceImpl.java:338)
   at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:313)
   at org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:290)
   at org.alfresco.repo.action.executer.MailActionExecuter$1.prepare(MailActionExecuter.java:430)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:353)
   … 24 more
19:50:00,361 ERROR [org.quartz.core.JobRunShell] Job DEFAULT.ExpiringContractJobDetail threw an unhandled Exception:
org.alfresco.error.AlfrescoRuntimeException: 09210006 Failed to send email to:myaddress@domain.com
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:488)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:196)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy208.execute(Unknown Source)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:780)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:700)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:538)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:524)
   at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:789)
   at com.saintgobain.sgsi.alfresco.action.DocumentExpiryNotificationJob.sendNotification(DocumentExpiryNotificationJob.java:312)
   at com.saintgobain.sgsi.alfresco.action.DocumentExpiryNotificationJob.execJob(DocumentExpiryNotificationJob.java:213)
   at com.saintgobain.sgsi.alfresco.action.DocumentExpiryNotificationJob$1.execute(DocumentExpiryNotificationJob.java:85)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:253)
   at com.saintgobain.sgsi.alfresco.action.DocumentExpiryNotificationJob.execute(DocumentExpiryNotificationJob.java:91)
   at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
   at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)

Any one have idea if there is any API changes for Email Executer?
I could not understand why it show "User does not exists: System"

Thanks for any info.

Outcomes