Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Error sending mail with Bamboo "NoClassDefFoundError: javax/activation/DataHandler"

Adrien Ragot _Requirement Yogi_ December 31, 2021

When I try to send a test email in the Bamboo 8.1.1 administration, it dislays an exception:

ognl.MethodFailedException: Method "save" failed for object com.atlassian.bamboo.ww2.actions.admin.mail.ConfigureMailServer@58c8309 [java.lang.NoClassDefFoundError: javax/activation/DataHandler]
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1981)
...
Caused by: java.lang.NoClassDefFoundError: javax/activation/DataHandler
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:169)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:159)
at com.atlassian.bamboo.mail.EmailService.sendEmailSynchronously(EmailService.java:115)
at com.atlassian.bamboo.mail.BambooMailer.send(BambooMailer.java:74)
at com.atlassian.bamboo.ww2.actions.admin.mail.ConfigureMailServer.testSMTPServer(ConfigureMailServer.java:130)
at com.atlassian.bamboo.ww2.actions.admin.mail.ConfigureMailServer.save(ConfigureMailServer.java:172)
...
Caused by: java.lang.ClassNotFoundException: javax.activation.DataHandler
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 302 more

More metadata:

Version: 8.1.1
Build: 80108
Build Date: 14 Dec 2021

Request information:
Request URL: https://bamboo.___.com/admin/saveMailServer.action
Scheme: https
Server: bamboo.dev.___.com
Port: 443
URI: /admin/saveMailServer.action
Context path:
Servlet path: /admin/saveMailServer.action
Path info:
Query string:

I'm on Java 11.0.11. I have moved the mail-1.6.2 and mail-api-1.5.6 from WEB-INF/lib to /lib, as recommended in the guidelines:

./atlassian-bamboo-8.1.1/lib/javax.mail-1.6.2.jar

./atlassian-bamboo-8.1.1/lib/javax.mail-api-1.5.6.jar

./atlassian-bamboo-8.1.1/atlassian-bamboo/WEB-INF/lib/atlassian-mail-5.0.0.jar

./atlassian-bamboo-8.1.1/atlassian-bamboo/WEB-INF/lib/cloud-compatible-email-validation-1.0.2.jar

 and I've configured the admin to use a JNDI mail, but the same thing happens if I type the email parameters manually into the administraiton.

Can anyone help me?

1 answer

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 1, 2022

 

Could you replace

javax.mail-1.6.2.jar

 with next version https://mvnrepository.com/artifact/javax.mail/javax.mail-api/1.5.6

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.1.1
TAGS
AUG Leaders

Atlassian Community Events