cancel
Showing results for 
Search instead for 
Did you mean: 

Error in E-mail Notification in BPM

ROHITGERA1
Participant
0 Kudos

Hi folks,
  I have create one Simple BPM Project in which i Created one Notification Activity to send the mail
  but when i am starting my BPM Project it is showing the below error in history :

Notification could not be sent to
the following recipients:
xxx@xxxx.com(Error sending e-mail),
xxx@xxxcom(Error sending e-mail)

and also the Task Event Notification is not working , giving following error :

Event notification could not be
sent to recipients xxx@xxx.com for task instance ID
7800745f-3a34-11e4-b4c2-0000037bb076. Problem: Cannot send e-mail because the
e-mail session cannot be retrieved

Please give the solution for this.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

have u configured the java mail service?

ROHITGERA1
Participant
0 Kudos

Dont know.
from where i can check this?
Please Tell me

Former Member
0 Kudos

Hi Rohit,

To configure the email service, please go to the nwa page.

Here go to Configuration Management > Infrastructure > Java system properties

Then, in the services tab, search for java mail client.

Here you have to set values for SMTP host and port, username, password and account to send emails from...

For more information, please check: Configuring Mail, Notification Messages, and Forms Services - Configuring Business Process Managemen...

Cheers!

ROHITGERA1
Participant
0 Kudos

Hi Alain ,
thank you for your reply , i have done the java mail setting as you told
but still mail notification is not working.

former_member191643
Active Contributor
0 Kudos

Contact your basis team to get the mail configurations done and get it checked whether the mail services working at the OS level too.

If everything seems fine, try it on a different server. If the issue persists only on this particular server, raise an OSS ticket with SAP.

junwu
Active Contributor
0 Kudos

please provide the error info from the default trace

ROHITGERA1
Participant
0 Kudos

Hi Jun

thnks for your reply
below is the default trace error :

Error
sending notification email to recipient xxx@xxx.com. Reason:
com.sap.bpem.base.mail.MailException: Cannot send e-mail because the e-mail
session cannot be
retrieved
[EXCEPTION]
com.sap.bpem.base.mail.MailException: Cannot send
e-mail because the e-mail session cannot be retrieved
at
com.sap.bpem.base.mail.Send.initializeSession(Send.java:65)
at
com.sap.bpem.base.mail.Send.send(Send.java:116)
at
com.sap.bpem.base.mail.MailSenderBean.doSend(MailSenderBean.java:43)
at
com.sap.bpem.base.mail.MailSenderBean.surroundSend(MailSenderBean.java:74)
at
com.sap.bpem.base.mail.MailSenderBean.send(MailSenderBean.java:26)
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
com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:37)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:21)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_MethodRetry.invoke(Interceptors_MethodRetry.java:46)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at
com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)
at
com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
at
com.sun.proxy.$Proxy397.send(Unknown Source)
at
com.sap.bpem.notification.adapter.Notification.send(Notification.java:385)
at
com.sap.bpem.notification.adapter.Notification.sendToUser(Notification.java:325)
at
com.sap.bpem.notification.adapter.Notification.handleUser(Notification.java:269)
at
com.sap.bpem.notification.adapter.Notification.handlePrincipals(Notification.java:189)
at
com.sap.bpem.notification.adapter.Notification.process(Notification.java:152)
at
com.sap.bpem.notification.adapter.NotificationHandler$2.inCommit(NotificationHandler.java:112)
at
com.sap.glx.core.kernel.mmtx.PrimaryTransaction.inCommit(PrimaryTransaction.java:263)
at
com.sap.glx.core.kernel.mmtx.AbstractTransaction.do_commit(AbstractTransaction.java:230)
at
com.sap.glx.core.kernel.mmtx.AbstractTransaction.commit(AbstractTransaction.java:128)
at
com.sap.glx.core.kernel.execution.LeaderWorkerPool$Follower.run(LeaderWorkerPool.java:171)
at
com.sap.glx.core.resource.impl.common.WorkWrapper.run(WorkWrapper.java:58)
at
com.sap.glx.core.resource.impl.j2ee.J2EEResourceImpl$Sessionizer.run(J2EEResourceImpl.java:255)
at
com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator$1.run(ServiceUserManager.java:164)
at
java.security.AccessController.doPrivileged(Native Method)
at
javax.security.auth.Subject.doAs(Subject.java:335)
at
com.sap.glx.core.resource.impl.j2ee.ServiceUserManager$ServiceUserImpersonator.run(ServiceUserManager.java:161)
at
com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at
java.security.AccessController.doPrivileged(Native Method)
at
com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:185)
at
com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:302)
Caused
by: javax.mail.AuthenticationFailedException
at
javax.mail.Service.connect(Service.java:319)
at
javax.mail.Service.connect(Service.java:169)
at
javax.mail.Service.connect(Service.java:118)
at
com.sap.bpem.base.mail.Send.initializeSession(Send.java:59)
... 49 more

junwu
Active Contributor
0 Kudos

javax.mail.AuthenticationFailedException

make sure you have put correct info in the java mail service.

Answers (2)

Answers (2)

ROHITGERA1
Participant
0 Kudos

Hi,

Still facing the issue , The mail server is working fine , mails are triggering from EJB (Java mail Service) but in BPM the notification is not working.

Thanks,

Rohit

Former Member
0 Kudos

I think that clearly shows there's an error with either the smtp account settings you entered, or with the mail server itself.

You should double check if the information you entered for the smtp account is correct and validate with basis if the mail server is working ok.