Mail server at location [java:comp/env/mail/GmailSmtpServer] is not of required type javax.mail.Session

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When adding a JNDI setting to an email server (specially if you are connecting your instance to Gmail), the following error is displayed:

The mail settings you entered were not valid. Error thrown was: Mail server at location [java:comp/env/mail/GmailSmtpServer] is not of required type javax.mail.Session.

Cause

As explained on Configuring Bamboo to send SMTP Email, you need to ensure that the files mail-X.X.jar and activation-X.X.jar exist only in the <Bamboo_Install>/lib directory.

The error occurs if the files exist both in <Bamboo-Install>/atlassian-bamboo/WEB-INF/lib and <Bamboo_Install>/lib.

Resolution

Removing the duplicate files will solve the problem.

  1. Shutdown Bamboo;
  2. Delete the <Bamboo_Install>/lib/mail-X.X.jar and <Bamboo_Install>/lib/activation-X.X.jar
  3. Restart Bamboo and attempt to reconfigure your mail server again.

 

Last modified on Nov 7, 2014

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.