在我执行atlas-clean之前,我发送的电子邮件工作正常。现在,我无法从我创建的调度程序服务发送电子邮件并引发错误,如下所示:
javax.mail.NoSuchProviderException: smtp
at javax.mail.Session.getService(Session.java:798)
at javax.mail.Session.getTransport(Session.java:720)
at javax.mail.Session.getTransport(Session.java:660)
at javax.mail.Session.getTransport(Session.java:640)
at com.crawco.jira.plugin.Reports.DailyReportService.execute(DailyReportService.java:449)
at com.atlassian.sal.jira.scheduling.JiraPluginSchedulerService.run(JiraPluginSchedulerService.java:94)
at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61)
at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47)
at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
可能是什么原因?
我已经在pom.xml中包含了以下内容 -
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.5</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
答案 0 :(得分:0)
感谢您的评论。
我刚刚发现,必须从atlassian-plugin.xml中删除java.mail和激活依赖项,因为这些库已经与JIRA一起出现了。所以在那之后,它工作正常,并使电子邮件工作。