com.atlassian.mail.MailException: javax.mail.NoSuchProviderException: smtp

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Steps needed to reproduce the behaviour: # Install Tomcat provided in packaged by Linux. # Place on CLASS_PATH {{mail-1.1.2}} from [GNU JavaMail|http://www.gnu.org/software/classpathx/javamail/javamail.html]. # Deploy JIRA WAR. # Configure SMTP integration in JIRA. # Attempt to sent email for e.g. from the admin > Services > SMTP. {noformat} An error has occurred with sending the test email: com.atlassian.mail.MailException: javax.mail.NoSuchProviderException: smtp at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:191) at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:91) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:139) ... Caused by: javax.mail.NoSuchProviderException: smtp at javax.mail.Session.getService(Session.java:794) at javax.mail.Session.getTransport(Session.java:718) at javax.mail.Session.getTransport(Session.java:661) at javax.mail.Session.getTransport(Session.java:641) at alt.javax.mail.SessionImpl.getTransport(SessionImpl.java:77) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:177) ... 111 more DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,gnu.mail.providers.smtp.SMTPTransport,nferrier@tapsellferrier.co.uk] java.lang.NoSuchMethodException: gnu.mail.providers.smtp.SMTPTransport.<init>(javax.mail.Session, javax.mail.URLName) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.getConstructor(Unknown Source) {noformat} Possible work around is listed in our documentation. {quote} 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 {quote} http://confluence.atlassian.com/display/JIRA/Configuring+JIRA+to+Send+SMTP+Mail#ConfiguringJIRAtoSendSMTPMail-MovetheJavaMailClasses
    via by Bogdan Dziedzic [Atlassian],
  • Steps needed to reproduce the behaviour: # Install Tomcat provided in packaged by Linux. # Place on CLASS_PATH {{mail-1.1.2}} from [GNU JavaMail|http://www.gnu.org/software/classpathx/javamail/javamail.html]. # Deploy JIRA WAR. # Configure SMTP integration in JIRA. # Attempt to sent email for e.g. from the admin > Services > SMTP. {noformat} An error has occurred with sending the test email: com.atlassian.mail.MailException: javax.mail.NoSuchProviderException: smtp at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:191) at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:91) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:139) ... Caused by: javax.mail.NoSuchProviderException: smtp at javax.mail.Session.getService(Session.java:794) at javax.mail.Session.getTransport(Session.java:718) at javax.mail.Session.getTransport(Session.java:661) at javax.mail.Session.getTransport(Session.java:641) at alt.javax.mail.SessionImpl.getTransport(SessionImpl.java:77) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:177) ... 111 more DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,gnu.mail.providers.smtp.SMTPTransport,nferrier@tapsellferrier.co.uk] java.lang.NoSuchMethodException: gnu.mail.providers.smtp.SMTPTransport.<init>(javax.mail.Session, javax.mail.URLName) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.getConstructor(Unknown Source) {noformat} Possible work around is listed in our documentation. {quote} 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 {quote} http://confluence.atlassian.com/display/JIRA/Configuring+JIRA+to+Send+SMTP+Mail#ConfiguringJIRAtoSendSMTPMail-MovetheJavaMailClasses
    via by Bogdan Dziedzic [Atlassian],
  • when user configures JNDI SMTP configuration and enters extra space characters in the JNDI location, our application accepts it but throws an error while sending email. Steps: # Navigate to mail servers from admin and configure SMTP mail server using JNDI location # Enter JNDI Location and enter some white spaces in the location field. # Attempt to send test email and also click on SMTP log level details check box and than exception will be thrown out like: {noformat} An error has occurred with sending the test email: com.atlassian.mail.MailException: javax.naming.NameNotFoundException: Name java: comp is not bound in this Context at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:187) at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:91) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:139) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:168) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ... Caused by: javax.naming.NameNotFoundException: Name java: comp is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.atlassian.mail.server.impl.SMTPMailServerImpl.getJndiSession(SMTPMailServerImpl.java:161) at com.atlassian.mail.server.impl.SMTPMailServerImpl.getSession(SMTPMailServerImpl.java:110) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:169) ... 110 more {noformat}
    via by Vikram Singh Siyawat [Atlassian],
  • when user configures JNDI SMTP configuration and enters extra space characters in the JNDI location, our application accepts it but throws an error while sending email. Steps: # Navigate to mail servers from admin and configure SMTP mail server using JNDI location # Enter JNDI Location and enter some white spaces in the location field. # Attempt to send test email and also click on SMTP log level details check box and than exception will be thrown out like: {noformat} An error has occurred with sending the test email: com.atlassian.mail.MailException: javax.naming.NameNotFoundException: Name java: comp is not bound in this Context at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:187) at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:91) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:139) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:168) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) ... Caused by: javax.naming.NameNotFoundException: Name java: comp is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.atlassian.mail.server.impl.SMTPMailServerImpl.getJndiSession(SMTPMailServerImpl.java:161) at com.atlassian.mail.server.impl.SMTPMailServerImpl.getSession(SMTPMailServerImpl.java:110) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:169) ... 110 more {noformat}
    via by Vikram Singh Siyawat [Atlassian],
  • Since JIRA 4.4.4 some configurations of Exchange smtp mailboxes are receiving errors when connecting to the mailbox. {noformat} com.atlassian.mail.MailException: javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:183) at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:102) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:76) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:205) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:143) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) ... Caused by: javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669) at javax.mail.Service.connect(Service.java:317) at javax.mail.Service.connect(Service.java:176) at javax.mail.Service.connect(Service.java:125) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:154) ... {noformat} I think this came about from a change in javamail. Versions earlier than 4.4.4 use javamail 1.4.1 and the newer versions use 1.4.4. Workaround: [JIRA KB|https://confluence.atlassian.com/display/JIRAKB/%27No+authentication+mechansims+supported+by+both+server+and+client%27+when+Configuring+Microsoft+Exchange+SMTP+Server]
    via by Ivan Tse,
  • Since JIRA 4.4.4 some configurations of Exchange smtp mailboxes are receiving errors when connecting to the mailbox. {noformat} com.atlassian.mail.MailException: javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:183) at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:102) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:76) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:205) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:143) at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) ... Caused by: javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669) at javax.mail.Service.connect(Service.java:317) at javax.mail.Service.connect(Service.java:176) at javax.mail.Service.connect(Service.java:125) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:154) ... {noformat} I think this came about from a change in javamail. Versions earlier than 4.4.4 use javamail 1.4.1 and the newer versions use 1.4.4. Workaround: [JIRA KB|https://confluence.atlassian.com/display/JIRAKB/%27No+authentication+mechansims+supported+by+both+server+and+client%27+when+Configuring+Microsoft+Exchange+SMTP+Server]
    via by Ivan Tse [Atlassian],
    • com.atlassian.mail.MailException: javax.mail.NoSuchProviderException: smtp at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:152) at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:72) at webwork.action.ActionSupport.execute(ActionSupport.java:153) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:46) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:131) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:186) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

    Users with the same issue

    Unknown visitor1 times, last one,