Error when setting gmail server for outgoing emails

Rumceisz July 6, 2012

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

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2012

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!

Rumceisz July 6, 2012

Hi Jobin,

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

Thanks,

Rumi

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2012

yes. try that.

Rumceisz July 7, 2012

Hi Jobin,

it works now.

Thanks,

Rumi

0 votes
Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 6, 2012

Hi Rumi,

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

Andrew.

Rumceisz July 6, 2012

Hi Andrew,

I did. I restarted several times.

Suggest an answer

Log in or Sign up to answer