Error when setting gmail server for outgoing emails

Hi All,

I just installed Jira 5 and I try to set gmail.smtp for outgoing emails.

I did the following steps according to the documentation (https://confluence.atlassian.com/display/JIRA/Using+Gmail+as+a+JIRA+Mail+Server):

1. I moved the activation-1.1.1.jar and mail-1.4.1.jar from Atlassian\JIRA\atlassian-jira\WEB-INF\lib to the Atlassian\JIRA\lib

2. I pasted the

<Resource name="mail/GmailSmtpServer"
    auth="Container"
    type="javax.mail.Session"
    mail.smtp.host="smtp.gmail.com"
    mail.smtp.port="465"
    mail.smtp.auth="true"
    mail.smtp.user="myusername@gmail.com"
    password="mypassword"
    mail.smtp.starttls.enable="true"
    mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>

to the server.xml file

3. Iconfigured on the outgoing email settings page the following:

Service Provider: Custom

Protocol: SMTP

SMTP Port: 25

TLS: checked

JNDI Location: java:comp/env/mail/GmailSmtpServer

Is there anything else to set???

When I test the connection I get a stack trace:


Oops - an error has occurred
System Error

A system error has occurred.

Please try submitting this problem via the Support Request Page
Otherwise, please create a support issue on our support system at http://support.atlassian.com with the following information:

a description of your problem
cut & paste the error and system information found below
attach the application server log file ( C:\Program Files (x86)\Atlassian\Application Data\JIRA\log\atlassian-jira.log )

Cause:
java.lang.reflect.InvocationTargetException

....

Caused by: java.lang.NoClassDefFoundError: com/google/common/cache/RemovalCause
at com.google.common.cache.CustomConcurrentHashMap$Segment.expireEntries(CustomConcurrentHashMap.java:2528)
at com.google.common.cache.CustomConcurrentHashMap$Segment.tryExpireEntries(CustomConcurrentHashMap.java:2508)
at com.google.common.cache.CustomConcurrentHashMap$Segment.getLiveValue(CustomConcurrentHashMap.java:3229)
at com.google.common.cache.CustomConcurrentHashMap$Segment.getOrCompute(CustomConcurrentHashMap.java:2220)
at com.google.common.cache.CustomConcurrentHashMap.getOrCompute(CustomConcurrentHashMap.java:3802)
at com.google.common.cache.ComputingCache.get(ComputingCache.java:46)
at com.atlassian.jira.user.DefaultUserPropertyManager.getPropertySet(DefaultUserPropertyManager.java:65)
at com.atlassian.jira.web.bean.I18nBean.getLocaleFromUser(I18nBean.java:54)
at com.atlassian.jira.security.JiraAuthenticationContextImpl.getI18nHelper(JiraAuthenticationContextImpl.java:100)
at com.atlassian.jira.action.JiraActionSupport.getI18nHelper(JiraActionSupport.java:260)
at com.atlassian.jira.action.JiraActionSupport.getText(JiraActionSupport.java:292)
at com.atlassian.jira.plugins.mail.webwork.MailServerActionSupport.doValidation(MailServerActionSupport.java:212)
at com.atlassian.jira.plugins.mail.webwork.VerifySmtpServerConnection.doVerification(VerifySmtpServerConnection.java:109)
at com.atlassian.jira.plugins.mail.webwork.VerifySmtpServerConnection.doAdd(VerifySmtpServerConnection.java:103)
... 135 more

Can you please help?

Thanks in advance!

Rumi

2 answers

1 accepted

Accepted Answer
0 votes

The class it complains about is in guava-10.0.1.jar file. Try copying (don't move) that as well and see if that fixes it. A shot in the dark!

Hi Jobin,

you mean copying to the Atlassian\JIRA\lib as the 2 jar files?

Thanks,

Rumi

yes. try that.

Hi Jobin,

it works now.

Thanks,

Rumi

Hi Rumi,

Did you restart JIRA after step 2? It would need a restart after moving JAR files and changing server.xml

Andrew.

Hi Andrew,

I did. I restarted several times.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

21,768 views 2 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you