1 2 3 Previous Next 35 Replies Latest reply on Jun 17, 2010 7:37 AM by viren_agarwal_rsg

    Unable to set the mail configuration properties in JBPM 4.0

      Hai!

       

      I am using jbpm 4.0 with jboss 5.0 and i am unable to configure jbpm.mail.properties in my application

      I have created new file called jbpm.mail.properties and in that i have written my configuration settings like

       

      mail.smtp.host mailhost.tifr.res.in

      mail.smtp.port 110

      mail.smtp.auth true

      mail.smtp.ssl true

      mail.smtp.user xxxxxx@tifr.res.in

      mail.smtp.password xxxxxxx

      mail.debug true

       

      It is stored inside src folder and i have configured this file in jbpm.cfg.xml as follows:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jbpm-configuration>

       

      <import resource="jbpm.default.cfg.xml" />

        <import resource="jbpm.tx.hibernate.cfg.xml" />

        <import resource="jbpm.jpdl.cfg.xml" />

        <import resource="jbpm.identity.cfg.xml" />

       

        <string name="jbpm.mail.smtp.host" value="mailhost.tifr.res.in" />

      <string name="resource.mail.properties" value="jbpm.mail.properties" />

       

       

      </jbpm-configuration>

       

      but still i am able to connect to localhost and on port 25 which i don't want to connect to it as i am changed my setting &

       

      Please help me in changing the mail.properties of jbpm

       

      Looking forward for your replays.....

        • 1. Re: Unable to set the mail configuration properties in JBPM 4.0

          Did you use jbpm in an application server or embedded?

           

          Application server:

          You have to copy the changed config files in the jbpm dir in your jboss!

           

          Embedded:

          I don't know how to setup jbpm with changed config files. But you can try to add this to your jbpm.jar (but I think this is not best practise).

           

          Best regards

          • 2. Re: Unable to set the mail configuration properties in JBPM 4.0

            Thank you Mr.Dominic Umbeer for your reply.

             

            I have configured Jboss with jbpm during the installation process only with the help of ant file that is present in jbpm folder like

             

            >ant install.jbpm.into.jboss

             

            by using above statement we need not to copy any other files into jboss as it will configure Jboss with the jbpm that you are using it.

            • 3. Re: Unable to set the mail configuration properties in JBPM 4.0
              kukeltje
              Your properties file is completely wrong... See the other post in this forum (might be on the same page, heck even a few below) and search the sun docs
              • 4. Re: Unable to set the mail configuration properties in JBPM 4.0

                Thank you for your reply

                 

                i have tried as here instead of previous posted properties file but still i am unable to configure server properties in jbpm.mail.properties

                 

                mail.smtp.host=mailhost.tifr.res.in

                mail.smtp.port=110

                mail.smtp.auth=true

                mail.smtp.ssl=true

                mail.smtp.user=xxxxxx@tifr.res.in

                mail.smtp.password=xxxxxxx

                mail.debug=true

                • 5. Re: Unable to set the mail configuration properties in JBPM 4.0
                  kukeltje
                  Your properties file is completely wrong... See the other post in this forum (might be on the same page, heck even a few below) and search the sun docs
                  • 6. Re: Unable to set the mail configuration properties in JBPM 4.0

                    Even after changing the file as given under i am unable to configure it

                     

                    mail.smtp.host=mailhost.tifr.res.in

                    mail.smtp.port=110

                    mail.smtp.auth=true

                    mail.smtp.ssl=true

                    mail.user=xxxxxxx@tifr.res.in

                    mail.password=xxxxxxx

                    mail.debug=true

                    • 7. Re: Unable to set the mail configuration properties in JBPM 4.0
                      kukeltje

                      Please look at my posts in http://community.jboss.org/thread/146887?tstart=0 (sorry, maybe you you thought I meant a post in this topic, but I said another post in this forum)

                       

                      Only 3 of your properties are correct (the last 3, and personally, I write the frist 2 of those differently)

                       

                      Also see

                      http://java.sun.com/products/javamail/FAQ.html

                       

                      and more specifically

                       

                      http://java.sun.com/products/javamail/javadocs/com/sun/mail/smtp/package-summary.html

                      • 8. Re: Unable to set the mail configuration properties in JBPM 4.0
                        kukeltje
                        But it could also be that I understand you wrongly, then please clarify the problem.
                        • 9. Re: Unable to set the mail configuration properties in JBPM 4.0

                          I am unable to configure the mail server properties in my jbpm application

                          my mail.properties is

                           

                          mail.smtps.host=mailhost.tifr.res.in

                          mail.smtps.port=110

                          mail.smtp.auth=true

                          mail.smtp.ssl=true

                          mail.transport.protocol=smtps

                          mail.user=xxxxxxx@tifr.res.in

                          mail.password=xxxxxxx

                          mail.debug=true

                           

                          i have also specified in jbpm.cfg.xml and I have added the new mail.properties file as above but still it is taking the default configuration setting to connect like

                           

                          mail.smtp.host=localhost

                          mail.smtp.port=25

                          mail.from=noreply@jbpm.org

                          What should i have to do to change it....
                          • 10. Re: Unable to set the mail configuration properties in JBPM 4.0
                            kukeltje
                            Ok, so you config file is not picked up? Where is it located? Afaik, it should be on the classpath for the .sar (if you use that, maybe even in the sar, replacing the existing one)
                            • 11. Re: Unable to set the mail configuration properties in JBPM 4.0

                              Still i am unable to send the mail from my application as the configuration file settings are not able to find it

                               

                              it is giving the following error message:

                               

                              12:47:04,875 INFO  [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd@253bbd

                              org.jbpm.api.JbpmException: could not send email: javax.mail.internet.MimeMessage@1d8bad2

                              at org.jbpm.pvm.internal.email.impl.MailSessionImpl.send(MailSessionImpl.java:60)

                              at org.jbpm.jpdl.internal.activity.MailActivity.perform(MailActivity.java:44)

                              at org.jbpm.jpdl.internal.activity.JpdlAutomaticActivity.execute(JpdlAutomaticActivity.java:15)

                              at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)

                              at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:637)

                              at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:597)

                              at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:201)

                              at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:64)

                              at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:37)

                              at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)

                              at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)

                              at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)

                              at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)

                              at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:66)

                              at com.LeaveController.startNewProcessInstance(LeaveController.java:35)

                              at com.Leave.doPost(Leave.java:56)

                              at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)

                              at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

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

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

                              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

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

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

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

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

                              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

                              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

                              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

                              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

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

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

                              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

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

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

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

                              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)

                              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

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

                              Caused by: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;

                                nested exception is:

                              java.net.ConnectException: Connection refused: 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 org.jbpm.pvm.internal.email.impl.MailSessionImpl.send(MailSessionImpl.java:50)

                              ... 37 more

                              Caused by: java.net.ConnectException: Connection refused: connect

                              at java.net.PlainSocketImpl.socketConnect(Native Method)

                              at java.net.PlainSocketImpl.doConnect(Unknown Source)

                              at java.net.PlainSocketImpl.connectToAddress(Unknown Source)

                              at java.net.PlainSocketImpl.connect(Unknown Source)

                              at java.net.SocksSocketImpl.connect(Unknown Source)

                              at java.net.Socket.connect(Unknown Source)

                              at java.net.Socket.connect(Unknown Source)

                              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)

                              ... 42 more

                              12:47:04,875 INFO  [STDOUT] could not send email: javax.mail.internet.MimeMessage@1d8bad2

                              • 12. Re: Unable to set the mail configuration properties in JBPM 4.0
                                kukeltje

                                Anand,

                                 

                                Please answer the questions, not just the symptoms.... Otherwise we cannot help.

                                 

                                Cheers,

                                 

                                Ronald

                                • 13. Re: Unable to set the mail configuration properties in JBPM 4.0

                                  The properties file is placed in the classpath where the jbpm.hibernate.xml file is placed as i am able to use the hibernate properties to connect to oracle database.but i could not understand why it is not taking jbpm.mail.properties resource file from jbpm.cfg.xml as i have mentioned in that file about the mail resource file in that.

                                  when i am trying to deploy the process it is giving the error that was posted pervious

                                   

                                  But  i am able to get connected to localhost on port 25 as it is the default properties of jbpm which i don't want to get connected as i want to connect to other server as mentioned in jbpm.mail.properties.

                                  • 14. Re: Unable to set the mail configuration properties in JBPM 4.0
                                    kukeltje

                                    'On the classpath' is a broad concept. The classpath for jars, ears, wars is/can be different. Is the jbpm.mail.properties file EXACTELY in the same location as the jbpm.hibernate.xml file? If so, try replacing the one IN the jbpm sar (as suggested before), or using a different name in the jbpm config to reference your specific properties file (by giving your file also a different name). Please a little more proactive approach from your side.

                                    1 2 3 Previous Next