为什么在java邮件中抛出此异常?

时间:2017-06-06 09:53:36

标签: java exception javamail

我正在运行执行程序服务来发送电子邮件。我正在使用apache tomcat 9.我在发送电子邮件的过程中遇到此异常。它说 Web应用程序已经停止。但我发现服务器运行正常。

else part

这是java中导致行的异常:

  06-Jun-2017 15:15:16.063 INFO [pool-1-thread-1] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal acces
s: this web application instance has been stopped already. Could not load [META-INF/javamail.providers]. The following stack trace is throw
n for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
 java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [META-INF/javamail
.providers]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the ille
gal access.
        at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1295)
        at org.apache.catalina.loader.WebappClassLoaderBase.findResources(WebappClassLoaderBase.java:923)
        at java.lang.ClassLoader.getResources(ClassLoader.java:1139)
        at javax.mail.Session$5.run(Session.java:1231)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.mail.Session.getResources(Session.java:1225)
        at javax.mail.Session.loadAllResources(Session.java:1137)
        at javax.mail.Session.loadProviders(Session.java:902)
        at javax.mail.Session.<init>(Session.java:219)
        at javax.mail.Session.getInstance(Session.java:241)
        at com.abc.wpp.mail.SendMediaEmail.sendMediaEmail(SendMediaEmail.java:34)
        at com.abc.wpp.mail.EmailService$1.run(EmailService.java:37)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

您认为导致此问题的原因是什么?

0 个答案:

没有答案