shivkumar.mallesappa Posted February 4, 2016 Share Posted February 4, 2016 Hello,I am getting the following error when I am scheduling a report :Subject:The job failed to execute. Review its parameters.Date:TodayComponent:Report SchedulerMessage:Job: nak (ID: 2317) Report unit: /public/Samples/Reports/01._Geographic_Results_by_Segment_Report Quartz Job: ReportJobs.job_2317 Quartz Trigger: ReportJobs.trigger_2313_0 Error Message: The job error notification was not completed. An error occurred while sending it. Exceptions: org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:392) 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:139) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendMailNotification(ReportExecutionJob.java:1059) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:570) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:241) at com.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.execute(ReportOptionsExecutionJob.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) Caused by: javax.mail.AuthenticationFailedException at javax.mail.Service.connect(Service.java:306) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389) ... 9 more Error Message: fail to send out alert mail notification Exceptions: org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:392) 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.ReportExecutionJobAlertImpl.sendAlertMail(ReportExecutionJobAlertImpl.java:97) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.sendAlertMail(ReportExecutionJob.java:708) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:595) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:241) at com.jaspersoft.ji.report.options.engine.ReportOptionsExecutionJob.execute(ReportOptionsExecutionJob.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) Caused by: javax.mail.AuthenticationFailedException at javax.mail.Service.connect(Service.java:306) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389) ... 9 more I have made following configuration in applicationContext-report-scheduling <property name="javaMailProperties"> <props> <!--<prop key="mail.smtp.sendpartial">true</prop>--> <prop key="mail.smtps.auth">true</prop> <prop key="mail.smtps.starttls.enable">true</prop> </props></property> I have made the following configuration in js.quartz.properties report.scheduler.mail.sender.host=smtp.gmail.comreport.scheduler.mail.sender.username=myname@gmail.comreport.scheduler.mail.sender.password=xxxxxxxxxreport.scheduler.mail.sender.from=myname@gmail.comreport.scheduler.mail.sender.protocol=smtpsreport.scheduler.mail.sender.port=465 What is the problem I could not able to figure it out.Thanks Link to comment Share on other sites More sharing options...
kkriplani Posted February 4, 2016 Share Posted February 4, 2016 From the error,"The job error notification was not completed. An error occurred while sending it. Exceptions: org.springframework.mail.MailAuthenticationException: Authentication failed":It clearly seems to be an authentication error. Check the quartz file. Even if the username/password are right, users tend to make an error with the mail port. I had encountered a similar query on this forum a few days back; have a look, http://community.jaspersoft.com/questions/972516/why-scheduled-report-not-getting-mailed Hope this helps,KKriplani Link to comment Share on other sites More sharing options...
shivkumar.mallesappa Posted February 4, 2016 Author Share Posted February 4, 2016 This is my new configuration : report.scheduler.mail.sender.host=smtp.gmail.comreport.scheduler.mail.sender.username=myname@gmail.comreport.scheduler.mail.sender.password=xxxxxxxxxreport.scheduler.mail.sender.from=myname@gmail.comreport.scheduler.mail.sender.protocol=smtpsreport.scheduler.mail.sender.port=465 and for application context : <prop key="mail.smtps.sendpartial">true</prop><prop key="mail.smtps.auth">true</prop> <prop key="mail.smtps.starttls.enable">true</prop> Still facing the same issue Link to comment Share on other sites More sharing options...
shivkumar.mallesappa Posted February 4, 2016 Author Share Posted February 4, 2016 I have also tried by making auth property false.my application context file is as follows : <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}"/>--> I have commented out user name and password and also made auth false so no authentication is required still I am facing same issue. <property name="protocol" value="${report.scheduler.mail.sender.protocol}"/> <property name="port" value="${report.scheduler.mail.sender.port}"/> <property name="javaMailProperties"> <props> <prop key="mail.smtps.sendpartial">true</prop> <prop key="mail.smtps.auth">false</prop> <prop key="mail.smtps.starttls.enable">true</prop></props> Link to comment Share on other sites More sharing options...
kkriplani Posted February 4, 2016 Share Posted February 4, 2016 Authentication error generally refers to wrong login credentials; Also,By default Gmail account is highly secured. When we use gmail smtp from non gmail tool, email is blocked. To test in our local environment, make your gmail account less secure as;1. Login to Gmail. 2. Access the URL as https://www.google.com/settings/security/lesssecureapps 3. Select "Turn on" But firstly check the quartz file and make sure the login credentials and port are correct. Link to comment Share on other sites More sharing options...
shivkumar.mallesappa Posted February 5, 2016 Author Share Posted February 5, 2016 Hi kkriplani, The issue was with securiy access.I tried with yahoo and it worked for me.Thanks for you help. 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