javydreamercsw Posted October 27, 2006 Share Posted October 27, 2006 In version 1.0.1 I was able to use the scheduler after the changes in the artifact: http://www.jasperforge.org/sf/go/artf1170;jsessionid=4B8B5B93F34AE5756F543B7C2CB4DDF8?nav=1. With the new settings prompted during installation I just can't make it work. Any help is greatly appreciated. This feature is a huge component of the production final tests I'm doing. Thanks in advance. Link to comment Share on other sites More sharing options...
swood Posted October 29, 2006 Share Posted October 29, 2006 The settings in this area have not changed in the new release. Have a look at /WEB-INF/js.mail.properties. You can see the port setting. ShermanJasperSoft Link to comment Share on other sites More sharing options...
javydreamercsw Posted October 30, 2006 Author Share Posted October 30, 2006 The installer prompst for new information and I think that's the issue. It asks for a protocol entry. I've used many options with no luck (SSL, STARTTLS, etc). Also à specify the port that worked on the previous version 587. Just in case the hostname is smtp.gmail.com. Any idea? Link to comment Share on other sites More sharing options...
swood Posted October 31, 2006 Share Posted October 31, 2006 The relevant configuration is in ?WEB-INF/applicationContext-report-scheduling: Code: <bean id="reportSchedulerMailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="${report.scheduler.mail.sender.host}"/> <property name="username" value="${report.scheduler.mail.sender.username}"/> <property name="password" value="${report.scheduler.mail.sender.password}"/> <property name="protocol" value="${report.scheduler.mail.sender.protocol}"/> <property name="port" value="${report.scheduler.mail.sender.port}"/> </bean> From http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/mail/javamail/JavaMailSenderImpl.html#setProtocol(java.lang.String) Protocol is a mail protocol, like 'SMTP'. ShermanJasperSoft Link to comment Share on other sites More sharing options...
javydreamercsw Posted October 31, 2006 Author Share Posted October 31, 2006 Thanks for the feedback. Just want to point out that it doesn't matter what you write down in the installer for the port it always writes 25 to the js.mail.properties file. Fixed that directly on the file and restarted the server. I got the following error with port 587: Code:11:07:43,944 ERROR ReportExecutionJob,JasperServerScheduler_Worker-0:179 - org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for SMTPorg.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for SMTPjavax.mail.NoSuchProviderException: No provider for SMTP at javax.mail.Session.getProvider(Session.java:455) at javax.mail.Session.getTransport(Session.java:650) at javax.mail.Session.getTransport(Session.java:631) at org.springframework.mail.javamail.JavaMailSenderImpl.getTransport(JavaMailSenderImpl.java:412) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:372) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:326) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:322) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:483) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:294) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:131) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Changed the port to 465 and restarted the server. I'm still waiting for the email but at least I got no error in the log. I'll let you guys know if the email arrives. I guess it should now. Link to comment Share on other sites More sharing options...
javydreamercsw Posted October 31, 2006 Author Share Posted October 31, 2006 Got an error also... Looks to be another thing... 11:41:39,251 ERROR ReportExecutionJob,JasperServerScheduler_Worker-1:179 - org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for SMTPorg.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for SMTPjavax.mail.NoSuchProviderException: No provider for SMTP at javax.mail.Session.getProvider(Session.java:455) at javax.mail.Session.getTransport(Session.java:650) at javax.mail.Session.getTransport(Session.java:631) at org.springframework.mail.javamail.JavaMailSenderImpl.getTransport(JavaMailSenderImpl.java:412) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:372) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:326) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:322) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:483) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:294) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:131) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)Post edited by: javydreamercsw, at: 2006/10/31 14:43 Link to comment Share on other sites More sharing options...
tkavanagh Posted November 1, 2006 Share Posted November 1, 2006 Hi All, the installer has an "informational bug" regarding the js.mail.properties setting. The protocol setting needs to be "smtp" (note the non-capitalization). This is also the only protocol that is currently supported (so the installer bug is that "smtp" should be the default). Link to comment Share on other sites More sharing options...
swood Posted November 1, 2006 Share Posted November 1, 2006 try 'smtp' (lower case) ShermanJasperSoft Link to comment Share on other sites More sharing options...
javydreamercsw Posted November 1, 2006 Author Share Posted November 1, 2006 Looks like we are getting closer. Now I do get a response from the smtp server (after setting protocol to 'smtp') but sadly is an error: Code:07:55:05,952 ERROR ReportExecutionJob,JasperServerScheduler_Worker-1:179 - org.springframework.mail.MailSendException: Could not send mails: 530 5.7.0 Must issue a STARTTLS command first 5sm1693961nzkorg.springframework.mail.MailSendException: Could not send mails: 530 5.7.0 Must issue a STARTTLS command first 5sm1693961nzkcom.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first 5sm1693961nzk at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:382) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:326) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:322) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:483) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:294) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:131) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Thanks in advance! Link to comment Share on other sites More sharing options...
lucianc Posted November 1, 2006 Share Posted November 1, 2006 AddCode:<property name="javaMailProperties"> <props> <prop key="mail.smtp.auth">true</prop> <prop key="mail.smtp.starttls.enable">true</prop> </props></property> to the "reportSchedulerMailSender" bean in applicationContext-report-scheduling.xml. Setting mail.smtp.auth seems a little redundant, since ideally it should be implied by a non-empty username. We'll have to think whether we can do something about this.. Regards,Lucian Link to comment Share on other sites More sharing options...
javydreamercsw Posted November 1, 2006 Author Share Posted November 1, 2006 Finally worked! Just as a note, it only works on port 587 on Gmail, 465 gives errors. This had to be done also on the previous version, now that I recall, but I spected it to be included in this version...Post edited by: javydreamercsw, at: 2006/11/01 15:11 Link to comment Share on other sites More sharing options...
kelly Posted July 20, 2007 Share Posted July 20, 2007 I have sending email problem too. it always gave me the error says:Code:Job: test (ID: 11)Report unit: /reports/samples/SalesByMonthQuartz Job: ReportJobs.job_11Quartz Trigger: ReportJobs.trigger_11_0Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connectorg.springframework.mail.MailSendException; nested exceptions (0) are: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 org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:382) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:335) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:331) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:595) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendToDestinations(ReportExecutionJob.java:357) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:278) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:148) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)Caused by: java.net.ConnectException: Connection refused: 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:516) at java.net.Socket.connect(Socket.java:466) 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) ... 11 morei tried to change the js.mail.properties and add the property too. but still the same error message. is there anybody know how to fix it?thanks in advance. Best regards. Kelly Link to comment Share on other sites More sharing options...
javydreamercsw Posted July 20, 2007 Author Share Posted July 20, 2007 Based on the stack trace it seems that you're either connecting to the wrong smtp server address and/or port. Verify those first. Also make sure that the mailing info you provided during install are correct since there was a bug in which the settings wasn't transfered to the properties file properly (not sure of what version you're using). The file is at [tomcat dir]/webapps/jasperserver/WEB-INF/js.mail Hope that helps!Post edited by: javydreamercsw, at: 2007/07/20 11:56 Link to comment Share on other sites More sharing options...
franzkrauth Posted February 22, 2010 Share Posted February 22, 2010 Lucien! This worked for me! Karma for you :-)I repeated your post here:http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=71124#71175Post Edited by franzkrauth at 23/02/2010 08:31 Link to comment Share on other sites More sharing options...
highjo Posted March 1, 2010 Share Posted March 1, 2010 Hello good people!i know this thread is old and i've seen some slight differences in files which are supposed to be edited in the version 3.7 which are js.quartz.properties and applicationContext-report-scheduling. what differences i've seen here, is at the applicationContext-report-scheduling level :<prop key="mail.smtp.starttls.enable">true</prop> is that ok just to add it? Link to comment Share on other sites More sharing options...
swood Posted March 2, 2010 Share Posted March 2, 2010 I think so. Try it and see. ShermanJaspersoft Link to comment Share on other sites More sharing options...
highjo Posted March 2, 2010 Share Posted March 2, 2010 Hello thanks for replying this.I 've realized that to use tls the port number has to be 587, and i just happened to noticed that it was said earlier.So after making that change i started having an entry in the the jasperserver.log file which i put with this poste.so is it a common error on jasperserver or it's has to go with my environement?anyway how to fix it? thanks for reading thisCode:2010-03-02 16:53:14,677 ERROR ReportExecutionJob,quartzScheduler_Worker-1:308 - An error occurred while sending job error notification.org.springframework.mail.MailSendException; nested exception details (1) are:Failed message 1:javax.mail.MessagingException: IOException while sending message; nested exception is: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_0_1879321.1267548791209" at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:625) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:403) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:342) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:338) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:1259) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:445) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:231) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)Caused by: javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_0_1879321.1267548791209" at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:870) at javax.activation.DataHandler.writeTo(DataHandler.java:301) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1350) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1683) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:585) ... 8 more Link to comment Share on other sites More sharing options...
swood Posted March 8, 2010 Share Posted March 8, 2010 Hmmm, this could be an issue with using JDK 1.6. See this thread http://old.nabble.com/javax.activation.UnsupportedDataTypeException:-no-object-DCH-for-MIME-type-multipart-mixed-td12523671.html Are you using JDK 1.6? If so, it looks like the workaround (from the above post) is to move the mail.jar from WEB-INF/lib to tomcat/common/lib (Tomcat 5.5) or tomcat/lib (Tomcat 6.X) ShermanJaspersoft Link to comment Share on other sites More sharing options...
NandiniBC Posted January 31, 2012 Share Posted January 31, 2012 hi folks,i am getting below error when i tried to send email from jasper.org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.localhost.com, port: 25; nested exception is: java.net.ConnectException: Connection refused: connectin js.quartz.properties file:report.scheduler.mail.sender.host=smtp.nandimsg.sonata.local.comreport.scheduler.mail.sender.username=chandrasekhar.kreport.scheduler.mail.sender.password=Lord@10creport.scheduler.mail.sender.from=chandrasekhar.k@sonata-software.comreport.scheduler.mail.sender.protocol=smtpreport.scheduler.mail.sender.port=25 report.scheduler.web.deployment.uri= http://localhost:8484/jasperserver in application-context-report-Scheduling.xml<property name="javaMailProperties"> <props> <prop key="mail.smtp.auth">true</prop> <prop key="mail.smtp.starttls.enable">true</prop> </props> </property>i tried with gmail settings as well for the above scheduling is working fine as set but email is not workingwhere i am doing wrong,please help me to find where exactly the problem. thanks much Link to comment Share on other sites More sharing options...
NandiniBC Posted February 2, 2012 Share Posted February 2, 2012 hi email notification in jasper is working now.when any organization using exchange server for mail communication dont use smtp as prefix for the host name. please see the below working configuartion Code:report.scheduler.mail.sender.host=webmail.sonata-software.comreport.scheduler.mail.sender.username=chandrasekhar.kreport.scheduler.mail.sender.password=Lord@10creport.scheduler.mail.sender.from=chandrasekhar.k@sonata-software.comreport.scheduler.mail.sender.protocol=smtpreport.scheduler.mail.sender.port=25report.scheduler.web.deployment.uri=http://localhost:8484/jasperserver Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now