12 Replies Latest reply on May 16, 2007 5:58 PM by jbosscompboy

    JBPM 3.2 - Mailing process - Exception during deployment

    ygiriyap

      Hi All ...

      I am trying to send a mail from my work flow.
      I am using Eclipse plugin to build and deploy my workflow.

      processdefinition.xml file looks like this

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition
       xmlns="urn:jbpm.org:jpdl-3.2" name="mailing">
      
       <swimlane name="SL_bert">
       <assignment actor-id="bert"></assignment>
       </swimlane>
      
      
       <start-state name="SN_Mailing">
       <transition name="N_MailAction_SendMail" to="N_MailAction_SendMail"></transition>
       </start-state>
      
       <node name="N_MailAction_SendMail">
       <event type="node-enter">
       <mail name="M_MailAction" to="someid@gmail.com" template="jbpm.mail.templates.xml">
       <subject>Subject: Mail action - mail</subject>
       <text>Text: This mail is of type- mail actions</text>
       </mail>
       </event>
       <transition name="EN_Mailing" to="EN_Mailing"></transition>
       </node>
      
       <end-state name="EN_Mailing"></end-state>
      
      </process-definition>
      


      I am using mail action inside the event to send a mail.
      When i try to deploy the process following Exception is thrown.

      Caused by: org.hibernate.HibernateException: instance not of expected entity type: org.jbpm.graph.action.MailAction is not a: org.jbpm.graph.def.Action


      org.jbpm.persistence.JbpmPersistenceException: hibernate commit failed
       at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:216)
       at org.jbpm.svc.Services.close(Services.java:222)
       at org.jbpm.JbpmContext.close(JbpmContext.java:139)
       at org.jbpm.webapp.servlet.ProcessUploadServlet.service(ProcessUploadServlet.java:69)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
       at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
       at java.lang.Thread.run(Unknown Source)
      Caused by: org.hibernate.HibernateException: instance not of expected entity type: org.jbpm.graph.action.MailAction is not a: org.jbpm.graph.def.Action
       at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3583)
       at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1347)
       at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:180)
       at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:487)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:84)
       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
       at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
       at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
       at org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:218)
       at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
       at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
       at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
       at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)
       at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)
       at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
       at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
       at org.hibernate.engine.Cascade.cascade(Cascade.java:130)
       at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:131)
       at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:122)
       at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:65)
       at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
       at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
       at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
       at org.jbpm.persistence.db.DbPersistenceService.commit(DbPersistenceService.java:253)
       at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:211)
       ... 22 more
      


      Please let me know if I have done anything wrong?
      What all configurations are involved in successfully executing a mailing workflow process?

      Kindly help.
      Thanks in advance.
      --Yash

        • 1. Re: JBPM 3.2 - Mailing process - Exception during deployment
          ygiriyap

          Hi Ronald ...

          Could you please provide any pointers to get this going.

          Thank you.
          Yash

          • 2. Re: JBPM 3.2 - Mailing process - Exception during deployment
            kukeltje

            I would if I had the time to try it. My spare time is currently filled with playing tennis, kitesurfing and a certain special lady. All that remains is being used to answer questions in the forum. Trying to find the cause of this would take relatively to much time, so I think I have to pass it.

            Ronald

            btw, this is not that I'm not willing, but I do not work for JBoss/RH/jBPM and have to do it all in my own time

            • 3. Re: JBPM 3.2 - Mailing process - Exception during deployment
              ygiriyap

              Hi Ronald ... np.

              I appreciate the spirit with which you have been answering the questions in the forum.Your replies have helped many and saved a lot of time.

              Meanwhile I found the issue. MailAction class which extends form the Action class doesnt have its corresponding hibernate mapping class.After tweaking few things I could deploy the process ... but couldnt instantiate it.

              Will post the solution once I get this working.

              Many thanks for you time.

              --Yash

              • 4. Re: JBPM 3.2 - Mailing process - NullPointerException during
                ygiriyap

                I added a new hibernate mapping file for MailAction class.

                org.jbpm.graph.action.MailAction.hbm.xml

                <?xml version="1.0"?>
                <!DOCTYPE hibernate-mapping PUBLIC
                 "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
                 "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
                
                <hibernate-mapping default-access="field" >
                 <subclass name="org.jbpm.graph.action.MailAction" discriminator-value="M" extends="org.jbpm.graph.def.Action">
                 </subclass>
                
                </hibernate-mapping>


                Now I could successfully deploy the process.


                Wait ... BUT !!!!

                When I try to instantiate the mailing process ... am getting NullPointerException
                42156 [http-8080-Processor25] ERROR org.jbpm.webapp.bean.ProcessBean - Failed to start process: org.jbpm.graph.def.DelegationException
                org.jbpm.graph.def.DelegationException
                 at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:367)
                 at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
                 at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:261)
                 at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
                 at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
                 at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
                 at org.jbpm.graph.def.Node.enter(Node.java:302)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
                 at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$5e7dd3fd.enter(<generated>)
                 at org.jbpm.graph.def.Transition.take(Transition.java:151)
                 at org.jbpm.graph.def.Node.leave(Node.java:393)
                 at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
                 at org.jbpm.graph.def.Node.leave(Node.java:357)
                 at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:190)
                 at org.jbpm.graph.def.Node.enter(Node.java:318)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
                 at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$5e7dd3fd.enter(<generated>)
                 at org.jbpm.graph.def.Transition.take(Transition.java:151)
                 at org.jbpm.graph.def.Node.leave(Node.java:393)
                 at org.jbpm.graph.node.StartState.leave(StartState.java:70)
                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                 at java.lang.reflect.Method.invoke(Unknown Source)
                 at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)
                 at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$5e7dd3fd.leave(<generated>)
                 at org.jbpm.graph.exe.Token.signal(Token.java:194)
                 at org.jbpm.graph.exe.Token.signal(Token.java:165)
                 at org.jbpm.webapp.bean.ProcessBean.startInstance(ProcessBean.java:162)
                 at org.jbpm.webapp.bean.ProcessBean$StartInstanceListener.processAction(ProcessBean.java:123)
                 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 javax.faces.component.UIData.broadcast(UIData.java:854)
                 at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)
                 at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
                 at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.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(ApplicationFilterChain.java:252)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                 at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
                 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
                 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
                 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
                 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
                 at java.lang.Thread.run(Unknown Source)
                Caused by: java.lang.NullPointerException
                 at org.jbpm.mail.Mail.send(Mail.java:98)
                 at org.jbpm.mail.Mail.execute(Mail.java:63)
                 at org.jbpm.graph.def.Action.execute(Action.java:122)
                 at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:247)
                


                This error is being thrown from ... GraphElement.executeAction method.
                log.error("action threw exception: " + exception.getMessage(), exception);


                Mail support being one of the major features of JBPM 3.2, should have enough documentation and make it easy to implement.

                Please let me know any pointers to solve this.

                Many thanks.
                --Yash

                • 5. Re: JBPM 3.2 - Mailing process - Exception during deployment
                  kukeltje

                  hmmm.. this is to me a 'serious bug' the file is indeed not in cvs. Please file a jira issue for this and if possible build a testcase for this so it will not happen in the future

                  For the nullpointer, there was a jira issue on this, somethig was fixed in cvs:

                  Mail.java 1.6 history download 7 days tbaeyens
                  added null pointer check on email recipients: JBPM-850

                  • 6. Re: JBPM 3.2 - Mailing process - Exception during deployment
                    ygiriyap

                     

                    For the nullpointer, there was a jira issue on this, somethig was fixed in cvs:

                    Mail.java 1.6 history download 7 days tbaeyens
                    added null pointer check on email recipients: JBPM-850


                    This issue takes care of scenario ... when ... actors dont have mail id associated with them.

                    But in my case ... I am providing the mailid in "to" attribute in the mail element.

                    But still the null pointer exception!!!

                    Anyway ... filed a jira issue for this.
                    http://jira.jboss.com/jira/browse/JBPM-929

                    Cheers,
                    --Yash


                    • 7. Re: JBPM 3.2 - Mailing process - Exception during deployment
                      mputz

                      Yash,

                      you receive the NPE because you don't have an actors attribute in your mail action. In the docu, 16.1.1 it says

                      There are two attribute to specify recipients: actors and to. The to attribute should resolve to a semicolon separated list of email addresses. The actors attribute should resolve to a semicolon separated list of actorIds. Those actorIds will be resolved to email addresses with by means of address resolving.


                      Although to me it sounds more like one has to specify actors OR to, if you look at the code both are getting checked. I've tried with your process, altered only this
                      <mail name="M_MailAction" to="martin@mputz.de" actors="ernie" template="jbpm.mail.templates.xml">

                      and I don't get an error.

                      Martin

                      btw, regarding your JIRA entry, not only the hibernate mapping for org.jbpm.graph.action.MailAction is missing, but also for org.jbpm.graph.node.MailNode

                      • 8. Re: JBPM 3.2 - Mailing process - Exception during deployment
                        ygiriyap

                        Hi Martin,

                        Thanks.I could deploy the process and instantiate the process as well.

                        But got stuck in the node that sends the mail. Mail is not being sent ... Enabled the debug and found the following error.


                        2007-04-05 16:28:11,500 DEBUG [org.jbpm.mail.Mail] - sending email to '[valid_id_for_bert@gmail.com, some_valid_id_to@yahoo.com]' about 'Subject: Mail action - mail'


                        Exception .... class javax.mail.SendFailedException: 550 <yash.giri@gmail.com> No such user here


                        2007-04-05 16:28:50,890 ERROR [org.jbpm.graph.def.GraphElement] - action threw exception: couldn't send email

                        org.jbpm.JbpmException: couldn't send email

                        at org.jbpm.mail.Mail.send(Mail.java:149)

                        at org.jbpm.mail.Mail.send(Mail.java:113)

                        at org.jbpm.mail.Mail.execute(Mail.java:63)

                        at org.jbpm.graph.def.Action.execute(Action.java:122)

                        at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:247)

                        at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)

                        at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)

                        at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)

                        at org.jbpm.graph.def.Node.enter(Node.java:302)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                        at java.lang.reflect.Method.invoke(Unknown Source)

                        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)

                        at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$3ffc4abc.enter(<generated>)

                        at org.jbpm.graph.def.Transition.take(Transition.java:151)

                        at org.jbpm.graph.def.Node.leave(Node.java:393)

                        at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                        at java.lang.reflect.Method.invoke(Unknown Source)

                        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)

                        at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$7a424106.leave(<generated>)

                        at org.jbpm.graph.exe.Token.signal(Token.java:194)

                        at org.jbpm.graph.exe.Token.signal(Token.java:139)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                        at java.lang.reflect.Method.invoke(Unknown Source)

                        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)

                        at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$ec8af150.signal(<generated>)

                        at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:475)

                        at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:389)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                        at java.lang.reflect.Method.invoke(Unknown Source)

                        at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:147)

                        at org.jbpm.taskmgmt.exe.TaskInstance$$EnhancerByCGLIB$$28eda7d1.end(<generated>)

                        at org.jbpm.webapp.tag.tf.ui.TaskForm$TaskFormActionListener.processAction(TaskForm.java:279)

                        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.webapp.tag.tf.ui.AbstractTaskFormButton.broadcast(AbstractTaskFormButton.java:51)

                        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)

                        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)

                        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.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(ApplicationFilterChain.java:252)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

                        at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

                        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

                        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)

                        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

                        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

                        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

                        at java.lang.Thread.run(Unknown Source)

                        Caused by: javax.mail.SendFailedException: Sending failed;
                        nested exception is:
                        class javax.mail.SendFailedException: Invalid Addresses;
                        nested exception is:
                        class javax.mail.SendFailedException: 550 <valid_id_for_bert@gmail.com> No such user here


                        at javax.mail.Transport.send0(Transport.java:218)

                        at javax.mail.Transport.send(Transport.java:80)

                        at org.jbpm.mail.Mail.send(Mail.java:147)

                        ... 68 more



                        I have also done the following ...
                        1. jbpm.mail.smtp.host is set to right value of an smtp server (where to set the port ??? I dont know) - Can I go wrong here??
                        2. In Mail.java ... from-user has been set to valid value.Compiled and added to jbpm-jpdl.jar

                        What else is missing? Why this error?


                        I am evaluating JBPM and pitching it in my company ... for the implementation of the WFs.
                        I have a demo in couple of days ... and desperately need to get this working.

                        Please provide pointers to solve this.

                        Thank you.
                        --Yash

                        • 9. Re: JBPM 3.2 - Mailing process - Exception during deployment
                          ygiriyap

                          Hi Martin/All ...

                          Got it going.Finally could send mails.
                          Had to provide auth details(javamail session properties) in my jbpm.cfg.xml file.

                          - for sending mails using smtp hosts(other than localhost) ... we need to provide the details like mail.smtp.host, mail.smtp.port, mail.smtp.auth, mail.smtp.user, password in a properties file or individually in jbpm.cfg.xml file.
                          - Without providing these details,we can send mails only to the localhost.Can verify this by using the http://localhost:8080/jbpm-mail/inbox (to use this,first we need to deploy jbpm-mail war on tomcat)


                          Martin,Thanks for your time and support.

                          Cheers,
                          --Yash

                          • 10. Re: JBPM 3.2 - Mailing process - Exception during deployment
                            jbosscompboy

                            I am trying to get the JBPM mail process working. I believe I have done what was suggested above. I have put a jbpm.cfg.xml file in my EAR root. This seams to work, because it finds the correct hibernate config file. I have also placed a jbpm.mail.properties file in the EAR root. The problem is that the MailAction behaves as if it does not see my properties file. It continues to try to connect to localhost. I will include my jbpm.cfg.xml, jbpm.mail.properties, and the stack trace showing that it is still trying to connect to localhost. If anyone has a clue about this, please let me know.

                            First the jbpm.cfg.xml

                            <jbpm-configuration>
                            
                             <jbpm-context>
                             <service name="persistence">
                             <factory>
                             <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
                             <field name="isTransactionEnabled"><false/></field>
                             </bean>
                             </factory>
                             </service>
                             <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
                             <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
                             <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
                             <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
                             <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
                             </jbpm-context>
                            
                             <string name="resource.hibernate.cfg.xml" value="jbpm.hibernate.cfg.xml" />
                            
                             <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
                            
                             <string name="jbpm.mail.templates" value="jbpm.mail.templates.xml" />
                             <string name="resource.mail.properties" value="jbpm.mail.properties" />
                            </jbpm-configuration>
                            


                            Second, the jbpm.mail.properties file
                            mail.smtp.host=cosmail01.com
                            mail.smtp.port=25
                            mail.smtp.auth=false
                            mail.smtp.ssl=false
                            mail.smtp.user=nobody
                            mail.smtp.password=none
                            


                            Finally the Stack Trace
                            11:36:21,547 ERROR [GraphElement] action threw exception: couldn't send email
                            org.jbpm.JbpmException: couldn't send email
                             at org.jbpm.mail.Mail.send(Mail.java:142)
                             at org.jbpm.mail.Mail.send(Mail.java:111)
                             at org.jbpm.mail.Mail.execute(Mail.java:63)
                             at org.jbpm.graph.def.Action.execute(Action.java:122)
                             at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:247)
                             at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)
                             at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:185)
                             at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
                             at org.jbpm.graph.def.Node.leave(Node.java:381)
                             at org.jbpm.graph.def.Node.leave(Node.java:357)
                             at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:120)
                             at com.afscn.common.jbpmtools.InitiateLeaveNode.execute(InitiateLeaveNode.java:18)
                             at org.jbpm.graph.def.Action.execute(Action.java:122)
                             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:585)
                             at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:205)
                             at org.jbpm.graph.def.Action_$$_javassist_93.execute(Action_$$_javassist_93.java)
                             at org.jbpm.graph.def.Node.execute(Node.java:338)
                             at org.jbpm.graph.def.Node.enter(Node.java:318)
                             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:585)
                             at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:205)
                             at org.jbpm.graph.def.Node_$$_javassist_79.enter(Node_$$_javassist_79.java)
                             at org.jbpm.graph.def.Transition.take(Transition.java:151)
                             at org.jbpm.graph.def.Node.leave(Node.java:393)
                             at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
                             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:585)
                             at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:205)
                             at org.jbpm.graph.def.Node_$$_javassist_79.leave(Node_$$_javassist_79.java)
                             at org.jbpm.graph.exe.Token.signal(Token.java:194)
                             at org.jbpm.graph.exe.Token.signal(Token.java:165)
                             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:585)
                             at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:205)
                             at org.jbpm.graph.exe.Token_$$_javassist_94.signal(Token_$$_javassist_94.java)
                             at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:478)
                             at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:417)
                             at org.jboss.seam.core.BusinessProcess.endTask(BusinessProcess.java:158)
                             at com.afscn.itapps.srq.request.actions.RouteRequestActionBean.submitRequest(RouteRequestActionBean.java:70)
                             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:585)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
                             at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
                             at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
                             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
                             at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
                             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
                             at org.jboss.seam.interceptors.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
                             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
                             at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
                             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
                             at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
                             at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
                             at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
                             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                             at java.lang.reflect.Method.invoke(Method.java:585)
                             at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
                             at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
                             at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                             at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                             at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                             at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211)
                             at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
                             at $Proxy147.submitRequest(Unknown Source)
                             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:585)
                             at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
                             at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                             at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
                             at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
                             at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
                             at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
                             at org.javassist.tmp.java.lang.Object_$$_javassist_125.submitRequest(Object_$$_javassist_125.java)
                             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:585)
                             at com.sun.el.parser.AstValue.invoke(AstValue.java:174)
                             at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:286)
                             at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
                             at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
                             at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
                             at javax.faces.component.UICommand.broadcast(UICommand.java:106)
                             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
                             at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
                             at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
                             at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
                             at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
                             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
                             at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
                             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
                             at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
                             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
                             at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
                             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
                             at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
                             at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
                             at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
                             at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
                             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                             at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
                             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                             at java.lang.Thread.run(Thread.java:595)
                            Caused by: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
                             nested exception is:
                             java.net.SocketException: Software caused connection abort: connect
                             at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
                             at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
                             at javax.mail.Service.connect(Service.java:275)
                             at javax.mail.Service.connect(Service.java:156)
                             at javax.mail.Service.connect(Service.java:105)
                             at javax.mail.Transport.send0(Transport.java:168)
                             at javax.mail.Transport.send(Transport.java:98)
                             at org.jbpm.mail.Mail.send(Mail.java:140)
                             ... 153 more
                            Caused by: java.net.SocketException: Software caused connection abort: connect
                             at java.net.PlainSocketImpl.socketConnect(Native Method)
                             at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
                             at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
                             at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
                             at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
                             at java.net.Socket.connect(Socket.java:519)
                             at java.net.Socket.connect(Socket.java:469)
                             at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
                             at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
                             at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
                             ... 160 more
                            


                            Thanks
                            Arthur Troyer


                            • 11. Re: JBPM 3.2 - Mailing process - Exception during deployment
                              kukeltje
                              • 12. Re: JBPM 3.2 - Mailing process - Exception during deployment
                                jbosscompboy

                                Thanks Ronald.

                                That JIRA did address some of my concerns. However it does not address all of them. I have determined through trial and error that you can never use a properties file. The reason is that the Mail.java code first checks for the existence of the "jbpm.mail.smtp.host" string, and will always find it. When reading the documentation, you would come to the conclusion that if you use a jbpm.cfg.xml, the default.jbpm.cfg.xml value would not be available. This is not the case. If you do not have a "jbpm.mail.smtp.host" string in your jbpm.cfg.xml file, the program winds up with the value from the default.jbpm.cfg.xml file. Therefore, it will always return a value for "jbpm.mail.smtp.host", and from that it follows that the Mail.java code will never search for the "resource.mail.properties" string.