fnurie Posted May 16, 2014 Share Posted May 16, 2014 Hello,I have a "jasperreports-server-cp-5.5.0a" on a "Windows 2008 Server R2" OS.I have configured js.quartz.properties file for sending emails.But cannot send mails. As i understand it tries connect to "mail.localhost.com" but i writed an IP adress as mail server in the configuration file. Configuration and error messages are below.Any help will be appreciated, thanks._________________________quartz.delegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegatequartz.tablePrefix=QRTZ_quartz.extraSettings=report.scheduler.web.deployment.uri=http://localhost:8080/jasperserverreport.scheduler.mail.sender.host=IP.adressreport.scheduler.mail.sender.username=xx@yy.comreport.scheduler.mail.sender.password=xxxxreport.scheduler.mail.sender.from=xx@yy.comreport.scheduler.mail.sender.protocol=smtpreport.scheduler.mail.sender.port=25_____________________________Subject:The job failed to execute. Review its parameters.Date:TodayComponent:Report SchedulerMessage:Job: nrtest1 (ID: 729) Report unit: /reports/REPORT_DAILY_16 Quartz Job: ReportJobs.job_729 Quartz Trigger: ReportJobs.trigger_726_0 Exceptions: The job error notification was not completed. An error occurred while sending it. org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unknown SMTP host: mail.localhost.com; nested exception is: java.net.UnknownHostException: mail.localhost.com. Failed messages: javax.mail.MessagingException: Unknown SMTP host: mail.localhost.com; nested exception is: java.net.UnknownHostException: mail.localhost.com; message exception details (1) are: Failed message 1: javax.mail.MessagingException: Unknown SMTP host: mail.localhost.com; nested exception is: java.net.UnknownHostException: mail.localhost.com at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1280) 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:389) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobMailNotificationImpl.sendMailNotification(ReportExecutionJobMailNotificationImpl.java:135) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:953) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:549) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:217) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) Caused by: java.net.UnknownHostException: mail.localhost.com at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) 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 more Link to comment Share on other sites More sharing options...
adam_7 Posted May 16, 2014 Share Posted May 16, 2014 Does your SMTP server require authentication? Link to comment Share on other sites More sharing options...
adam_7 Posted May 16, 2014 Share Posted May 16, 2014 I would check this file and set the authentication option to true if your SMTP server requires authentication. $TOMCAT/webapps/jasperserver/WEB-INF/applicationContext-report-scheduling.xml and change the following option.. <property name="javaMailProperties"><props><prop key="mail.smtp.auth">true</prop></props></property> Link to comment Share on other sites More sharing options...
fnurie Posted May 19, 2014 Author Share Posted May 19, 2014 Hi adam_7,Authentication was false in the applicationContext-report-scheduling.xml file, so i changed it as you described and restarted jasperserver. However smtp error seems to not changed:Job: denemepazar2 (ID: 785) Report unit: /reports/REPORT_HOURLY_16 Quartz Job: ReportJobs.job_785 Quartz Trigger: ReportJobs.trigger_782_0 Exceptions: The job error notification was not completed. An error occurred while sending it. org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unknown SMTP host: mail.localhost.com; nested exception is: java.net.UnknownHostException: mail.localhost.com. Failed messages: javax.mail.MessagingException: Unknown SMTP host: mail.localhost.com; nested exception is: java.net.UnknownHostException: mail.localhost.com; message exception details (1) are: Failed message 1: javax.mail.MessagingException: Unknown SMTP host: mail.localhost.com; nested exception is: java.net.UnknownHostException: mail.localhost.com at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1280) 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:389) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJobMailNotificationImpl.sendMailNotification(ReportExecutionJobMailNotificationImpl.java:135) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:953) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:549) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:217) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) Caused by: java.net.UnknownHostException: mail.localhost.com at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:579) at java.net.Socket.connect(Socket.java:528) 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 more Link to comment Share on other sites More sharing options...
adam_7 Posted May 20, 2014 Share Posted May 20, 2014 Your smtp server is "mail.localhost.com"? are you sure your smtp settings are set up correctly? Link to comment Share on other sites More sharing options...
Solution fnurie Posted June 2, 2014 Author Solution Share Posted June 2, 2014 I found the problem,I was editing this file : "jasperreports-server-cp-5.5.0abuildomaticbuild_confdefaultwebappWEB-INFjs.quartz.properties"butit should be this file: " jasperreports-server-cp-5.5.0aapache-tomcatwebappsjasperserverWEB-INFjs.quartz.properties" 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