- 
        15. Re: Unable to set the mail configuration properties in JBPM 4.0akstifr Jan 20, 2010 6:06 AM (in response to kukeltje)Thank you for your reply Ronald for the problem. The jbpm.mail.properties file is EXACTELY in the same location as the jbpm.hibernate.xml file I have tried to use a different name in the jbpm.cfg.xml to reference my specific properties file but it did not work it out still. Later i tried to modify the configurations files of jbpm and jboss manually and it seems to be working a little bit at present i.e it is getting connected to mailserver as per properties file but it is raising an exception like 16:17:30,734 INFO [STDOUT] 220 mailhost.tifr.res.in ESMTP Postfix (2.2.10) 16:17:30,734 INFO [STDOUT] DEBUG SMTP: connected to host "mailhost.tifr.res.in", port: 25 16:17:30,734 INFO [STDOUT] EHLO anand ......... ........ 16:17:30,781 INFO [STDOUT] DEBUG SMTP: Found extension "PIPELINING", arg "" 16:17:30,781 INFO [STDOUT] DEBUG SMTP: Found extension "SIZE", arg "20480000" 16:17:30,781 INFO [STDOUT] DEBUG SMTP: Found extension "VRFY", arg "" 16:17:30,781 INFO [STDOUT] DEBUG SMTP: Found extension "ETRN", arg "" 16:17:30,781 INFO [STDOUT]DEBUG SMTP: Found extension "8BITMIME", arg "" 16:17:30,781 INFO [STDOUT] DEBUG SMTP: use8bit false 16:17:30,781 INFO [STDOUT] javax.mail.MessagingException: can't determine local email address 16:17:30,781 INFO [STDOUT] at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:906) 16:17:30,781 INFO [STDOUT] at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.email.impl.MailSessionImpl.send(MailSessionImpl.java:51) 16:17:30,781 INFO [STDOUT] at org.jbpm.jpdl.internal.activity.MailActivity.perform(MailActivity.java:44) 16:17:30,781 INFO [STDOUT] at org.jbpm.jpdl.internal.activity.JpdlAutomaticActivity.execute(JpdlAutomaticActivity.java:15) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:637) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:597) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:201) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:64) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:37) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55) 16:17:30,781 INFO [STDOUT] at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:66) 16:17:30,781 INFO [STDOUT] at com.LeaveController.startNewProcessInstance(LeaveController.java:35) 16:17:30,781 INFO [STDOUT] at com.Leave.doPost(Leave.java:56) 16:17:30,781 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) 16:17:30,781 INFO [STDOUT] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 16:17:30,781 INFO [STDOUT] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) 16:17:30,781 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190) 16:17:30,781 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92) 16:17:30,781 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) 16:17:30,781 INFO [STDOUT] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 16:17:30,781 INFO [STDOUT] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 16:17:30,781 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) 16:17:30,781 INFO [STDOUT] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828) 16:17:30,781 INFO [STDOUT] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601) 16:17:30,781 INFO [STDOUT] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 16:17:30,781 INFO [STDOUT] at java.lang.Thread.run(Unknown Source) 16:17:30,781 INFO [STDOUT] QUIT 16:17:30,812 INFO [STDOUT] 221 Bye 16:17:30,828 INFO [DefaultCommandService] exception while executing command org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd@1908140 org.jbpm.api.JbpmException: could not send email: javax.mail.internet.MimeMessage@1947e20 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: can't determine local email address at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:906) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583) at org.jbpm.pvm.internal.email.impl.MailSessionImpl.send(MailSessionImpl.java:51) ... 37 more 16:17:30,828 INFO [STDOUT] could not send email: javax.mail.internet.MimeMessage@1947e20 but still unable to send the mail from it.... 
- 
        16. Re: Unable to set the mail configuration properties in JBPM 4.0akstifr Jan 21, 2010 4:42 AM (in response to akstifr)And after number of trials with the configuration files, war files, jar files,soon i could thought of it for sending mail from my application i have do it. Finally i am able to send the mail from my application to any email id as specified in it. the solution for the previous error is that it was missing from address in the xxx.jpdl.xml file in mail tag i.e i have added to it as under <mail g="199,118,126,60" name="Send_approval_email"> <from addresses="yyyyyyyyyy@tifr.res.in"/> <to addresses="xxxxxxxx@gmail.com"/> <subject>Test Mail</subject> <text>Reason:This is a test mail from JBPM application that we are working on...</text> <transition g="-42,-18" name="reject" to="end"/> </mail> Finally it got working.... Thank you Ronald for your commitment to help users towards JBPM and its development Hoping to do more research in JBPM in comming days and post more quires........ With regards, Anand ******Work for Green Environment****** 
- 
        17. Re: Unable to set the mail configuration properties in JBPM 4.0kukeltje Jan 20, 2010 7:33 AM (in response to akstifr)That is because your mail config is still not good.... Has nothing to do with jBPM. Try to make a standalone java application and see if you can send mail from it. It is not my task to provide you with a full correct mail properties file and educate you how basic java mail works. Google on the errors and see what that turns up... So helpful... 
- 
        18. Re: Unable to set the mail configuration properties in JBPM 4.0kukeltje Jan 20, 2010 7:36 AM (in response to akstifr)1 of 1 people found this helpfulok, our posts crossed... great that it works now. And the error is not specifically related to missing a from in the jPDL file, it is missing a from in *general* (you could put a default one on the mail properties file (which is needed anyway for e.g. sending reminders etc...) Now I'm *very* curious on how your mail.properties file finally looks. Can you post that... since there still was more than one error in it... Ronald 
- 
        19. Re: Unable to set the mail configuration properties in JBPM 4.0akstifr Jan 20, 2010 8:18 AM (in response to kukeltje)Thank you to helping me in resolving the issue properly and correctly. Here is the mail.properties file contents mail.transport.protocol=smtps mail.host=mailhost.tifr.res.in mail.port=25 mail.smtps.starttls.enable=true mail.smtps.auth=true mail.user=xxxxxxx95@tifr.res.in mail.password=yyyyyyyyyy mail.smtps.quitwait=false mail.debug=true Help me if any mistake in it... - 
            
                            
            jbpm.mail.properties.zip 279 bytes
 
- 
            
                            
            
- 
        20. Re: Unable to set the mail configuration properties in JBPM 4.0kukeltje Jan 20, 2010 9:19 AM (in response to akstifr)1 of 1 people found this helpfulThis one looks (almost) fine. If you want to send task notifies and reminders, you need a mail.from or mail.smtps.from to. If that is not present, I think javamail will concatenate the user and host so you'll get a xxxxxxx95@tifr.res.in@mailhost.tifr.res.in which is incorrect and not sure if that results in the same exception you got before (I think it does). So e.g. setting mail.smtps.from=noreply@tifr.res.in is always a good thing and will be overridden by the from you set in the mail nodes 
- 
        21. Re: Unable to set the mail configuration properties in JBPM 4.0akstifr Jan 21, 2010 12:27 AM (in response to kukeltje)As you said to try a simple standalone application, i tried the following program about the send mail java application which you have specified here: http://www.rgagnon.com/javadetails/java-0570.html does not work and it raises the following error : DEBUG SMTP: useEhlo true, useAuth true DEBUG SMTP: trying to connect to host "mailhost.tifr.res.in", port 110, isSSL true DEBUG SMTP: exception reading response: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? Exception in thread "main" javax.mail.MessagingException: Exception reading response; nested exception is: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1462) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1260) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at javax.mail.Service.connect(Service.java:275) at com.TestMail.test(TestMail.java:45) at com.TestMail.main(TestMail.java:19) Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at com.sun.net.ssl.internal.ssl.InputRecord.handleUnknownRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(Unknown Source) at com.sun.net.ssl.internal.ssl.AppInputStream.read(Unknown Source) at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:97) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:75) at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:1440) ... 5 more and i searched google to find out the solution but it was of no use seems to me till now......let me try out different possibility and books to solve it .
- 
        22. Re: Unable to set the mail configuration properties in JBPM 4.0kukeltje Jan 21, 2010 3:33 AM (in response to akstifr)SMTP to port 110????? 110 is for POP3 
- 
        23. Re: Unable to set the mail configuration properties in JBPM 4.0akstifr Jan 21, 2010 4:43 AM (in response to kukeltje)After changing it other port numbers like 25 also it is giving same error as of previous post only............... 
- 
        24. Re: Unable to set the mail configuration properties in JBPM 4.0kukeltje Jan 21, 2010 5:33 AM (in response to akstifr)Your client is trying to do SSL over a non-ssl connection. Maybe the server does not support SSL on that port. Try to do a connection with telnet and issue the EHLO command to it. See if it supports SSL (via starttls) or maybe there is a completely different port where SSL is directly available)
- 
        25. Re: Unable to set the mail configuration properties in JBPM 4.0akstifr Jan 21, 2010 7:59 AM (in response to kukeltje)But when i am using port no 25 in the jbpm.mail.properties, it work fine and i am able to send the mail from it. But when i tried with standalone java application, it does not work it out. I cannot understand why this error is raising here and not in jbpm I searched google but it of no use to me.....as every one had the same problem but no one have given the clear idea about the solution for Some of the links where i found are http://forums.sun.com/thread.jspa?forumID=43&threadID=787382 http://forums.sun.com/sunsearch.jspa soon...... 
- 
        26. Re: Unable to set the mail configuration properties in JBPM 4.0kukeltje Jan 21, 2010 8:27 AM (in response to akstifr)Make sure in your standalone application the starttls property is also set. Otherwise your client expects a direct SSL connection and not starting with a plaintext connection....
- 
        27. Re: Unable to set the mail configuration properties in JBPM 4.0akstifr Jan 24, 2010 11:50 PM (in response to kukeltje)Even after setting the following properties...still i am unable to send mail from the standalone java application. Here are the properties that i have set to send the mail props.put("mail.transport.protocol", "smtps"); props.put("mail.host", SMTP_HOST_NAME); props.put("mail.port", SMTP_HOST_PORT); props.put("mail.smtps.auth", "true"); props.put("mail.smtps.quitwait", "false"); props.put("mail.smtps.starttls.enable", "true"); Now what other properties i have to set ......in order to make it run 
- 
        28. Re: Unable to set the mail configuration properties in JBPM 4.0cicciovega Mar 3, 2010 9:27 AM (in response to akstifr)Hi guys, i have the same problem: my jbpm.mail.properties is mail.smtps.starttls.enable=true mail.smtps.auth=true mail.smtp.host=smtp.gmail.com mail.smtp.port=465 mail.transport.protocol=smtps mail.from=my_mail@gmail.com mail.user=my_mail mail.password=pwd mail.debug=true and my mail.jpdl.xml is: <?xml version="1.0" encoding="UTF-8"?> <process name="MyMAIL" xmlns="http://jbpm.org/4.3/jpdl"> <start g="126,51,48,48" name="start1"> <transition name="to mail" to="mail" g="-60,-18"/> </start> <mail g="122,300,92,52" name="mail"> <from addresses="my_mail@gmail.com"/> <to addresses="my_other_mail@gmail.com"/> <subject>hello</subject> <text>world</text> <transition name="to end1" to="end1" g="-42,-18"/> </mail> <end name="end1" g="169,444,48,48"/> </process> It not works: console: 15:12:09,316 DEBUG [ProcessDefinitionImpl] creating new execution for process 'MyMAIL' 15:12:09,316 DEBUG [DatabaseIdComposer] generated execution id MyMAIL.4160002 15:12:09,316 DEBUG [ExecuteActivity] executing activity(start1) 15:12:09,316 DEBUG [ExecuteActivity] executing activity(moveFile) 15:12:09,332 INFO [STDOUT] DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTran sport,Sun Microsystems, Inc] 15:12:09,472 INFO [STDOUT] DEBUG SMTP: useEhlo true, useAuth false 15:12:09,472 INFO [STDOUT] DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL false and then i have an Request-timeout exception in jbpm-console. If i write in jbpm.mail.properties mail.smtps.host=smtp.gmail.com instead of mail.smtp.host=smtp.gmail.com, in console i see ...trying to connect to host localhost, port 465, isSSL false I've tried also to write a java appl standalone and made it runs under jbpm process and it works fine. public class SendMail { private static final String SMTP_HOST_NAME = "smtp.gmail.com"; private static final int SMTP_HOST_PORT = 465; private static final String SMTP_AUTH_USER = "my_mail@gmail.com"; private static final String SMTP_AUTH_PWD = "pwd"; public static void main(String[] args) throws Exception{ new SendMail().test(); } public void test() throws Exception{ Properties props = new Properties(); props.put("mail.transport.protocol", "smtps"); props.put("mail.smtps.host", SMTP_HOST_NAME); props.put("mail.smtps.auth", "true"); // props.put("mail.smtps.quitwait", "false"); Session mailSession = Session.getDefaultInstance(props); mailSession.setDebug(true); Transport transport = mailSession.getTransport(); MimeMessage message = new MimeMessage(mailSession); message.setSubject("Testing SMTP-SSL"); message.setContent("This is a test", "text/plain"); message.addRecipient(Message.RecipientType.TO, new InternetAddress("my_other_mail@gmail.com")); transport.connect (SMTP_HOST_NAME, SMTP_HOST_PORT, SMTP_AUTH_USER, SMTP_AUTH_PWD); transport.sendMessage(message, message.getRecipients(Message.RecipientType.TO)); transport.close(); } }Any idea?? TIA 
- 
        29. Re: Unable to set the mail configuration properties in JBPM 4.0akstifr Mar 4, 2010 3:22 AM (in response to cicciovega)check your jbpm.cfg.xml file as this one <?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="resource.mail.properties" value="jbpm.mail.properties" /> </jbpm-configuration> Did you configure your gmail setting, protocols and port number correctly? Message was edited by: Anand Kumar 
 
    