com.atlassian.mail.MailException: javax.naming.NameNotFoundException: Name java: comp is not bound in this Context

Atlassian JIRA | Vikram Singh Siyawat [Atlassian] | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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}

    Atlassian JIRA | 6 years ago | Vikram Singh Siyawat [Atlassian]
    com.atlassian.mail.MailException: javax.naming.NameNotFoundException: Name java: comp is not bound in this Context
  2. 0

    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}

    Atlassian JIRA | 6 years ago | Vikram Singh Siyawat [Atlassian]
    com.atlassian.mail.MailException: javax.naming.NameNotFoundException: Name java: comp is not bound in this Context
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    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

    Atlassian JIRA | 6 years ago | Bogdan Dziedzic [Atlassian]
    com.atlassian.mail.MailException: javax.mail.NoSuchProviderException: smtp

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.mail.MailException

      javax.naming.NameNotFoundException: Name java: comp is not bound in this Context

      at com.atlassian.mail.server.impl.SMTPMailServerImpl.send()
    2. com.atlassian.mail
      SMTPMailServerImpl.send
      1. com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:187)
      1 frame
    3. com.atlassian.jira
      SendTestMail.doExecute
      1. com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:91)
      1 frame
    4. webwork.action
      ActionSupport.execute
      1. webwork.action.ActionSupport.execute(ActionSupport.java:165)
      1 frame
    5. com.atlassian.jira
      JiraActionSupport.execute
      1. com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54)
      1 frame
    6. webwork.dispatcher
      GenericDispatcher.executeAction
      1. webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:139)
      1 frame
    7. com.atlassian.jira
      JiraWebworkActionDispatcher.service
      1. com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:168)
      1 frame
    8. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      1 frame