4 Replies Latest reply on Mar 2, 2009 6:49 AM by Devendra Jain

    Problem sending mail in JBPM

    Debnath Mukherjee Newbie

      Hi

      I am facing a problem sending mail in JBPM. I'm using a mail node.
      In the designer, in the mail info, I have mentioned:

      Destination : To
      Email : email in standard format e.g. abc@somecompany.com
      Subject : test mail from JBPM
      Body: test

      The contents of the jbpm.cfg.xml is as follows:
      <jbpm-configuration>

      <string name="jbpm.mail.smtp.host" value=(standard ip address
      of mail server) />

      </jbpm-configuration>

      I have edited the jbpm.cfg.xml in the src/main/config in the
      left pane of the designer and included this file while deploying.

      The process however is unable to send mail. The error is
      shown in a stack trace as attached below.

      If you have any ideas please let me know.

      Thanks,

      Debnath

      16:39:52,337 ERROR [GraphElement] action threw exception: couldn't send email
      org.jbpm.JbpmException: couldn't send email
      at org.jbpm.mail.Mail.send(Mail.java:152)
      at org.jbpm.mail.Mail.send(Mail.java:116)
      at org.jbpm.mail.Mail.execute(Mail.java:63)
      at org.jbpm.graph.def.Action.execute(Action.java:122)
      at org.jbpm.graph.def.Action$$FastClassByCGLIB$$7876e90e.invoke(<generat
      ed>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.graph.def.Action$$EnhancerByCGLIB$$52fea928.execute(<generat
      ed>)
      at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:264)
      at org.jbpm.graph.node.MailNode.execute(MailNode.java:29)
      at org.jbpm.graph.def.Node.enter(Node.java:319)
      at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke()
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$5994afcc.enter()

      at org.jbpm.graph.def.Transition.take(Transition.java:151)
      at org.jbpm.graph.def.Node.leave(Node.java:394)
      at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:1
      36)
      at org.jbpm.graph.node.Decision.execute(Decision.java:152)
      at org.jbpm.graph.def.Node.enter(Node.java:319)
      at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke()
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$5994afcc.enter()

      at org.jbpm.graph.def.Transition.take(Transition.java:151)
      at org.jbpm.graph.def.Node.leave(Node.java:394)
      at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
      at org.jbpm.graph.node.TaskNode$$FastClassByCGLIB$$923668a4.invoke(<gene
      rated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$95985f8a.leave(<genera
      ted>)
      at org.jbpm.graph.exe.Token.signal(Token.java:195)
      at org.jbpm.graph.exe.Token.signal(Token.java:140)
      at org.jbpm.graph.exe.Token$$FastClassByCGLIB$$74df1c6e.invoke(<generate
      d>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$88ee1d48.signal()
      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:485)
      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:399)
      at org.jbpm.jsf.core.action.CompleteTaskActionListener.handleAction(Comp
      leteTaskActionListener.java:47)
      at org.jbpm.jsf.core.impl.JbpmActionListenerWrapper.processAction(JbpmAc
      tionListenerWrapper.java:82)
      at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
      at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:
      758)
      at javax.faces.component.UICommand.broadcast(UICommand.java:368)
      at org.jbpm.jsf.taskform.ui.UITaskFormButtonBase.broadcast(UITaskFormBut
      tonBase.java:56)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)

      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:7
      52)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicat
      ionPhase.java:97)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:175)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
      torBase.java:524)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
      rocessConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
      int.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
      kerThread.java:112)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: javax.mail.SendFailedException: Sending failed;
      nested exception is:
      class javax.mail.MessagingException: Exception reading response;
      nested exception is:
      java.net.SocketException: Socket is not connected: recv failed
      at javax.mail.Transport.send0(Transport.java:218)
      at javax.mail.Transport.send(Transport.java:80)
      at org.jbpm.mail.Mail.send(Mail.java:150)
      ... 69 more