Unable to Sent Mail Due to 'mail-1.x.jar' Conflict
症状
The following error appears when testing the mail connection:
HTTP Status 404 - Could not execute action [SendTestMail]:javax/mail/Authenticator<p><small><small><pre>java.lang.NoClassDefFoundError: javax/mail/Authenticator at org.apache.naming.factory.MailSessionFactory.getObjectInstance(MailSessionFactory.java:105) at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:140) at
原因
Some operating systems may ship the JavaMail classes with application servers (eg. Tomcat in Red Hat Enterprise Linux). This may conflict with JIRA's copy of the JavaMail classes.
In Linux, you could check for the files by using the following command from your JIRA Home Directory and JIRA Installation Directory with the following commands:
find `pwd` -name *mail*
find `pwd` -name *activation*
ソリューション
To prevent any conflicts, check your application server's lib/ directory:
- If the application server already contains mail-1.4.1.jar and activation-1.1.1.jar, then just remove WEB-INF/lib/mail-1.4.1.jar and WEB-INF/lib/activation-1.1.1.jar from the JIRA webapp.
- If the application server does not contain mail-1.4.1.jar and activation-1.1.1.jar, then move JIRA's WEB-INF/lib/mail-1.4.1.jar and WEB-INF/lib/activation-1.1.1.jar into the application server's lib/ directory.
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.